2

I'm trying to install microsoftml and revoscalepy. These packages are developed by microsoft and can be used (apparently) for scoring python models in SQL server 2017.

I'm using an anaconda environment with python 3.7 installed.

The intuitive does not work:

pip install microsoftml
pip install revoscalepy 

Could not find a version that satisfies the requirement microsoftml

The syntax of the docs also gives me an error

pip install https://rserverdistribution.azureedge.net/production/revoscalepy/9.2.1/wb/1033/d282048eb04046999211535f7368a0a4/windows/microsoftml-1.5.0-py3-none-any.whl

Could not find a version that satisfies the requirement revoscalepy

Would appreciate any other suggestions.

Roelant
  • 4,508
  • 1
  • 32
  • 62

2 Answers2

2

It took me a bit of time to understand, so here I will try to explain my findings. Also check the full docs.

  • microsoftml and revoscalepy are not on PyPi, so you can not pip install them. Rather they are included in a full python 3.5 distribution provided by Microsoft. It is a shame they don't support >= 3.6.
  • You can install this either when installing Microsoft SQL Server 2017 (or beyond). This is generally what you want to do if you want to use it in SQL.
  • Or you can install the seperate dist by installing it yourself. I personally used this when developing code on a different machine than the database.

SQL server tips

  • Make sure the so-called launchpad is on - see here.
  • Make sure you executed (in SQL) sp_configure 'clr enabled', 1
  • Make sure you executed (in SQL) sp_configure 'external scripts enabled', 1; RECONFIGURE WITH OVERRIDE;
  • Make sure you enabled the scoring mechanism on the SQL database. See this part of the docs.
  • If you cannot assign users to the scoring role, see this fix.
  • For me this was the folder F:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES
  • Help your python developers by directly registering a jupyter kernel cd folder & python.exe –m ipykernel install –name “Py35 SQL”

Separate installation tips

  • Follow the steps outlined here, and NOT the steps here.
  • For me this was the installation folder C:\Program Files\Microsoft\ML Server\PYTHON_SERVER
  • Help your python developers by directly registering a jupyter kernel cd folder & python.exe –m ipykernel install –name “Py35 SQL”
Roelant
  • 4,508
  • 1
  • 32
  • 62
0

As a novice user of these SQL 2017 packages, I found Microsoft's documentation at the link below most helpful: https://learn.microsoft.com/en-us/sql/advanced-analytics/install/sql-machine-learning-services-windows-install?view=sql-server-2017

I was able to successfully setup and run some revoscalepy and microsoftml samples on my Windows 10 machine. I used Python 3.5.