Skip to content

Latest commit

 

History

History
119 lines (92 loc) · 4.78 KB

pip.md

File metadata and controls

119 lines (92 loc) · 4.78 KB

pip installation guide

Installation via pip is supported, but will require .NET Core 2.0 dependencies to be installed prior.

The following chart shows the .NET Core 2.0 dependencies on different Linux distributions that are officially supported. The pip installation steps will outline commands to execute to download and install the dependencies.

OS Dependencies
Ubuntu 14.04 libunwind8, libicu52
Ubuntu 16.04 libunwind8, libicu55
Ubuntu 17.04 libunwind8, libicu57
Debian 8 (Jessie) libunwind8, libicu52
Debian 9 (Stretch) libunwind8, libicu57
CentOS 7
Oracle Linux 7
RHEL 7
OpenSUSE 42.2
Fedora 25
libunwind, libcurl, libicu
Fedora 26 libunwind, libicu

Quick Start

mssql-cli needs Python to run, and works with Python 2.7 and 3.6.

mssql-cli is installed via pip. If you know pip, you can install mssql-cli using command

$ pip install mssql-cli

This command may need to run as sudo if you are installing to the system site packages. mssql-cli can be installed using the --user option, which does not require sudo.

$ pip install --user mssql-cli

If you are having installation issues, see the troubleshooting section for known issues and workarounds.

Detailed Instructions

For supported operating system specific installations, see one of the following links:

Windows Installation

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-cli using the below command.

C:\> pip install mssql-cli

NOTE: If Python was installed into the "Program Files" directory, you may need to open the command prompt as an administrator for the above command to succeed.

macOS Installation

On macOS, Python 2.7 is generally pre-installed. You may have to upgrade pip with the following easy_install commands.

$ sudo easy_install pip
$ sudo pip install --upgrade pip
$ sudo pip install mssql-cli --ignore-installed six

Linux Installation

Installing on Linux using pip is no longer recommended. Please consult the Linux Installation Guide for installing mssql-cli with apt-get or yum.

On Linux, Python 2.7 is generally pre-installed. There are two prerequisite packages to run mssql-cli on Linux: libunwind and libicu.

Install Red Hat Enterprise Linux (RHEL) 7

$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
$ sudo yum -y install ./epel-release-latest-7.noarch.rpm
$ sudo yum -y install icu libunwind python-pip 
$ sudo pip install mssql-cli

Install CentOS 7

$ sudo yum -y install epel-release 
$ sudo yum -y install libunwind libicu python-pip 
$ sudo pip install mssql-cli

Install Fedora 25, Fedora 26

$ dnf upgrade
$ dnf install libunwind libicu python-pip
$ sudo pip install mssql-cli

Install Ubuntu / Debian / Mint

$ sudo apt-get update & sudo apt-get install -y libunwind8 python-pip
$ sudo apt-get install -y libicu60 2> /dev/null || sudo apt-get install -y libicu57 2> /dev/null || sudo apt-get install -y libicu55 2> /dev/null || sudo apt-get install -y libicu55 2> /dev/null || sudo apt-get install -y libicu52
$ pip install --user mssql-cli

Install OpenSUSE 42.2 or later

$ sudo zypper update
$ sudo zypper install libunwind libicu python-pip
$ sudo pip install mssql-cli

Install SUSE Enterprise Linux (SLES) 12 SP2 or later

$ sudo zypper update
$ sudo zypper install libunwind libicu python-pip
$ sudo pip install mssql-cli