SQLTeam.com | Weblogs | Forums

SQL 2017 MLS - cant add python packages

Hi

I'm new-ish to MLS and have been trying to add new python packages like attrs to the python but it hasn't been working.

Our set up is SQL 2017 with CU14 on Win 2016. Python version is 3.5.2

The usual command I run is :

"pip install attrs" ( without quotes )

and I run this from the C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\Scripts

but nothing happens.....it says "collecting attrs" then nothing. WHen I look in the

So I updated a dev VM to CU22, and it installed Python 3.7 and tried same thing - it worked. But this doesn't help me as we already have existing SQL 2017 servers with this package in it and the dude who originally set this up is gone, so any help appreciated.

All the installs are default, nothing special.

Thanks.

When was the last time MLS worked properly or did it ever work?

Whats the status of the Machine Learning Service? Is it running?

Under whose name is that service running?

Here is the docnon specific way to install packages

Hi

I'm logged on as local windows and SQL admin and its a stand alone server, not on a domain.
This server is also running under Vmware Workstation Pro 16, hopefully that shoudlnt matter.
The VM has full internet connectivity.
Its Win 2016 64 bit and SQL 2017 with SQL 2017 CU15 installed.

Its kind of weird, I'm not sure whats going on. I read the link you kindly supplied, I changed to the \scripts directory and this time ran "pip install blis" ( without the quotes ) and it says "collecting blis" and then nothing happens. This is weird....

Any help appreciated.

If you read mls install, you dont need to be connected inside the vm, you can run python stuff locally and run it against the remote sql server as long as client side pytjon version match with server

Hi

Unfortunately they are using the SQL 2017 MLS to do stuff inside SQL itself.
WHats bugging me is that it also falls over with a message when I try to use pip to install.
" [‘python.exe has stopped working’
I'm making sure all the Win2016 patches are correct and will let you know how it goes.
Thanks for your suggestions...

So, python was crashing when I would try and run the following command from the .....\PYTHON_SERVICES\Scripts directory :

"pip install <insert_python_package_name_here> "

This was on a virtual machine ( on VMWare Workstation 16 Pro ) running Windows 2016 server ( OS fully patched ) and had SQL Server 2017 with CU14. Python version at SQL 2017 CU14 level is 3.5.2.

When I ran "pip install...." , python would crash with a message :

"An unhandled win 32 exception occurred in python.exe [4596]....."

Other times I would get a value of [608] and it would change each time etc.

However the problem is now solved - I can now install python packages fine - my new 2020 Dell Inspirion 5593 with latest Intel 10th Generation i7 CPU is running Windows 10 and has VMWare Workstation 16 Pro on it. The VM I was doing this work in has Win2016 with SQL 2017, was running was at Virtual Machine Hardware Compatibility of 16.x

It appears that Windows 2016 doesn't like that 16.x hardware compatibility level.

So in VMWare Workstation 16 Pro you have these hardware compatibility choices ( in this order ) :

Workstation 5.x, 6.0, 6.5-7.x, 8.x, 9.x, 10.x, 11.x, 12.x, ESXi 6.5 ( same as my ESXi server at home ), 14.x, ESXi 6.7, 15.x , ESXi 7.0, 16.x

Now with ESXI 6.5 hardware compatibility setting enabled for my VM and using BIOS ( not UEFI ), I can run "pip install...." commands from the command prompt and it works happily every time.

How I worked this out was that on my old Dell 2950 VMware server at home ( which is ESXi 6.5 ) - the pip installs worked.

Hopefully this might help someone else.

( As a side note and not related to this issue - if you install CU22 on SQL Server 2017, the CU22 installs python 3.7 ( side by side with 3.5.2), and when you run "pip install....." python package installs for this version works fine - maybe the python.exe for 3.7 is a better version? )

1 Like