mssql-scripter is installed via pip. If you know pip, you can install mssql-scripter using command
$ pip install mssql-scripter
This command may need to run as sudo if you are installing to the system site packages. mssql-scripter can be installed using the --user option, which does not require sudo.
$ pip install --user mssql-scripter
If you are having installation issues, see the troubleshooting section for known issues and workarounds.
Upon installation, mssql-scripter will detect the operating system or distribution of the host to install the mssqltoolsservice, a platform specific native dependency. Due to this native dependency being detected during the setup.py install, it is recommended that wheel caches not be shared amongst different operating system platforms and distributions. If you upgrade your operating system or distribution, please reinstall mssql-scripter with --no-cache-dir option.
$ pip install mssql-scripter --no-cache-dir
For operating system specific installs, see one of the following links:
Check if Python is installed using command:
$ python --version
If Python is not installed or less than version 2.7, upgrade Python using the following command:
$ sudo brew install python
Check if pip 9.0 or above is installed using command:
$ pip --version
If pip is not installed or less than version 9.0, upgrade pip using the following command:
$ sudo pip install --upgrade pip
Install mssql-scripter using command:
$ sudo pip install mssql-scripter
Check if pip 9.0 or above is installed using command:
$ pip --version
If pip is not installed or less than version 9.0, upgrade pip using the following command:
$ sudo apt-get install python-pip
$ sudo pip install --upgrade pip
Install mssql-scripter using command:
$ sudo pip install mssql-scripter
If you are using Ubuntu or Debian, you'll need to install the libunwind8 package. See the libunwind8 installation steps below.
If you are using RHEL, you'll need to install the icu package. See the icu installation steps below.
Python is not installed by default on Windows. The latest Python installation package can be downloaded from here. When installing, select the 'Add Python to PATH' option. Python must be in the PATH environment variable.
Once Python is installed and in the PATH environment variable, open a command prompt, and install mssql-scripter using the command:
C:\> pip install mssql-scripter
If you're having installation issues, please check the below known issues and workarounds. If you're having a different issue, please check the issues page to see if the issue has already been reported. If you don't see your issue there, filing a new issue would be appreciated.
If the installation was successful and this error message is encountered, this may be caused by different versions of python in the environment. i.e Used python 3.6 to install mssql-scripter, but PATH has python 2.7 so it uses the python 2.7 interpreter which has no visibility to packages installed into python 3.6.
The workaround to prevent this is to use a virtual environment, which will provide a isolated environment that is tied to a specific python version. More information can be found at:
If you see the above error running pip install mssql-scripter
, this means the pip version used is out-of-date. Upgrade pip using the command:
$ sudo apt-get install python-pip
$ sudo pip install --upgrade pip
Error: System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.
If you encounter this error on MacOS, this means you need the latest version of OpenSSL. To update:
$ brew update
$ brew install openssl
$ mkdir -p /usr/local/lib
$ ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
$ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
If you encounter the below error running mssql-scripter, this means the libunwind8 package is not installed. This error has been seen on Ubuntu 14 & 17, Debian 8.
Failed to load /usr/local/lib/python2.7/dist-packages/mssqltoolsservice/bin/libcoreclr.so, error
libunwind.so.8: cannot open shared object file: No such file or directory
If you encounter this error running mssql-scripter Red Hat Enterprise Linux, it could be due to the icu package not being installed. See the icu installation steps below.
Run commands
$ sudo apt-get update
$ sudo apt-get install libunwind8
The file `/etc/apt/sources.list' needs to be updated with the following line
deb http://ftp.us.debian.org/debian/ jessie main
Then run commands:
$ sudo apt-get update
$ sudo apt-get install libunwind8
Run commands
## libunwind.x86_64 is in the epel-release repository
## (Not necessary on GNOME, minimal install does not have this installed)
$ sudo yum -y install epel-release
$ sudo yum -y install libunwind
Run commands
$ sudo yum install icu