Skip to content

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.
💡 Let yourself be tempted

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Stéphane Haby

Stéphane Haby

Stéphane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.View Author posts

182 posts since April 2011

Leave a Comment

Your email address will not be published. Required fields are marked *