Infrastructure at your Service

Stéphane Haby

SQL Server 2017: Python server

After my article SQL Server 2017: first steps with Python Service, I write this article about my first test with the Python Server feature in SQL Server 2017.

The installation is very simple, in the features Selection window, you have in the Shared Features, you have a Machine Learning Server (Standalone) with R and Python.
I check Python to install the Python Server and here we go.
Python_srv01
Like for the Python services, you need to accept “Consent to install Python”
Python_srv02
Don’t forget to give access to Internet to your server. If not, the installation failed and you have this message:
Python_srv03
With Internet, the installation is successful.
Python_srv06
At the end of the installation, I open the summary file to analyze what is installed.
I find feature parameters for the script installation for the Python Server:

  • SQL_SHARED_AA for the Machine Learning Server (Standalone) – AA is for ADVANCED ANALYTICS
  • SQL_SHARED_MPY for Python

Python_srv07
At this point, I have a Python Server but, now, what is a Python Server?
On my server, I open the search and tape Python as keyword…
Python_srv08
No result found… Ok. Old method, go to the folder and search manually.
I go directly in the folder “C:\Program Files\Microsoft SQL Server\140” and I see a folder “PYTHON_SERVER”:
Python_srv09
I open the folder “PYTHON_SERVER” and see three executables:

  • Uninstall-Anaconda: to uninstall the python server
  • Python: Command Console to execute Python code
  • Pythonw: Command Console to execute Python code without Window

Python_srv10
To Test the Python server, I run the executable python (to have a cmd window) and use the same example as my article for the Python service.
The Python query is:

Import pip
Installed_packages = pip.get_installed_distributions()
Installed_packages_list = sorted([“%s %s” % (i.key, i.version) for I in Installed_packages])
Print(Installed_packages_list)
Len(Installed_packages_list)

Python_srv11
As you can see in the picture, the same 125 packages as for the Python Service are installed on the Python Server.
:idea: Let yourself be tempted

2 Comments

  • Hi Stephane,
    Thanks for this post.
    I do not find revoscalepy module in the list of installed modules. So, I am not able to run any of Microsoft rx module. Any suggestion?

    Thanks,
    Vesko

    • Stéphane Haby says:

      Hi Vesko,

      First, check if the package is on the server in C:\Program Files\Microsoft SQL Server\140\PYTHON_SERVER\Lib\site-packages and see if you have a package named revoscalpy.
      If not, copy the package in this folder, restart the service and check again.
      I have installed today the RC2 and the package version 9.2.0 is in the list.

      Don’t hesitate to give me a feedback if it’s good now!
      Regards,
      STH

Leave a Reply

Stéphane Haby
Stéphane Haby

Delivery Manager