SQL Server 2017 MLS and pip - cannot uninstall : “It is a distutils installed project”
When SQL 2017 MLS does the initial installation, it functions as the package manager. So when Pip comes along and tries to update the distutil packages, the packages dont recognize Pip as having authority to update the packages.
This also effectively means that MLS has a hard limitation with any packages that are "distutils locked" and these specific packages are 100% non-updatable. This may affect your application if it needs to update these packages.
Possibly this means a separate non-MS python stack that can be 100% updated would be the go if you need to update any package as required.
I know my question is similar to others out there, but its also kind of not.
I have python 3.5.2 which is installed under SQL 2017 CU16 Machine Learning Services ( MLS ).
When trying to upgrade scikit-learn from its vendor-installed level of 0.18 up to 0.22 I get the message
" It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall."
I could just hunt for all instances of scikit-learn in the windows directories and delete them, but I think this is a bad idea, and I have no real concept of how python packages are installed in windows, so I suspect my package is registered somewhere deep inside windows somewhere but I'm not sure where.
The problem is our data scientists now want to go up in scikit-learn package values and of course they cant unless I can work out how to cleanly de-install scikit-learn and install a new package using pip.
I even did a clean install and was running pip 9.x  and tried to remove the package via pip and got this message :
"DEPRECATION: Uninstalling a distutils installed project (scikit-learn) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
One option is we have python 3.7.1 recently installed side by side with the existing python 3.5.2 due to applying SQL 2017 CU22, but could have the same issue later when I want to upgrade packages that are installed by the initial install process. This seems to be a  significant shortcoming with SQL 2017 MLS in that youre locked down in terms of what python software you can run, which is not very flexible.
I'm wondering if there is there a way to stop certain packages being installed as part of  the initial SQL 2017 MLS install process, like scikit-learn, so they can be installed later.
Any help is greatly appreciated...