execute sp_execute_external_script
@language = N'Python',
@script = N'
import sys
print(sys.version)'
Before you can do this the scripts feature should be enabled:
sp_configure 'external scripts enabled', 1;
RECONFIGURE WITH OVERRIDE;
You can either install the 'Advanced Analytics' using the options when installing or expanding an SQL server instance, or stand alone (don't use both possibilities together!).
The SQL settings for Python can be found in:
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn\pythonlauncher.config
This is the default of the content of this file:
PYTHONHOME=C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES
ENV_PYTHONIOENCODING=UTF-8
ENV_ExaMpiCommDllPath=C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\Lib\site-packages\revoscalepy\rxLibs\
MPI_HOME=C:\Program Files\Microsoft MPI
INSTANCE_NAME=MSSQLSERVER
TRACE_LEVEL=1
JOB_CLEANUP_ON_EXIT=1
USER_POOL_SIZE=0
WORKING_DIRECTORY=C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData
PKG_MGMT_MODE=0
Installed the C++ 2015 redistributable (needed for TensorFlow).
I wanted to use another Python version because Tensorflow doesn't correctly install in the current (and I use 3.6 for the current AI experiments).
Unfortunately one cannot change the above PHYTONHOME folder to another Python version. One needs the revoscalepy package, and this only works with the provided 3.5.2 version of Python.
Eventually I discovered that the TensorFlow version caused the issue on the server. Installing version 1.4 works.
(use admin command promt)
python -m pip install --ignore-installed tensorflow==1.4.0
python -m pip install --upgrade keras==2.1.3 (error on newer version)
The numpy is out of date:
python -m pip uninstall numpy
python -m pip install --upgrade numpy
There is this feature called 'binding' to upgrade an R or Python instance. This will probably be mainly available for SQL server 2019.
python -m pip install --upgrade keras==2.1.3 (error on newer version)
The numpy is out of date:
python -m pip uninstall numpy
python -m pip install --upgrade numpy
There is this feature called 'binding' to upgrade an R or Python instance. This will probably be mainly available for SQL server 2019.
geen plaatjes :-(
BeantwoordenVerwijderen