sqlmlutils icon indicating copy to clipboard operation
sqlmlutils copied to clipboard

How to Force Upgrade of Python Package?

Open hifihedgehog opened this issue 6 years ago • 2 comments

This is not clearly described in the documentation either here or on Microsoft's website. What is the process to upgrade a Python package to a later version when you receive the following information message:

Package scikit-learn exists on server. Set upgrade to True to force upgrade.".format(pkgname)) The version of scikit-learn you are trying to install is 0.22.1. The version installed on the server is 0.18.1

What is the syntax I am supposed to follow?

hifihedgehog avatar Jan 10 '20 16:01 hifihedgehog

Hi, upgrading the base packages is unfortunately not supported. By base Python packages, I mean the ones that are installed together with the runtime shipped with SQL Server. We will fix the error message as it is misleading, and also clarify this limitation on our documentation website. Is there some way I can follow up with you via email on an option that we are working on which might help in the future? Thanks, Nellie

NelGson avatar Jan 30 '20 07:01 NelGson

That's good to know. I strongly suggest that the documentation on Microsoft's website should clarify this since it expressly states (with a proceeding ! in the header):

The standard Python pip install command is not recommended for adding Python packages on SQL Server 2019. Instead, use sqlmlutils as described in this article.

As a result, I thought that all along I was taking the wrong approach since the documentation at one point in time began stating there that using pip was outdated when, in reality, it has been the correct approach. In either case, I will therefore continue using pip since I have to upgrade certain pre-installed libraries in order to support newer machine learning features that these libraries do not support in their stock, out-of-date form.

hifihedgehog avatar Jan 31 '20 22:01 hifihedgehog