dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.35k stars 192 forks source link

Python3 install installs wrapper calling python instead of python3 #451

Closed thorstenkampe closed 4 years ago

thorstenkampe commented 4 years ago
> sudo pip3 install mssql-cli
Collecting mssql-cli
  Using cached mssql_cli-0.18.2-py2.py3-none-manylinux1_x86_64.whl (43.4 MB)
Requirement already satisfied: [...]
[...]
Installing collected packages: mssql-cli
Successfully installed mssql-cli-0.18.2
> mssql-cli
/usr/local/bin/mssql-cli: Zeile 16: python: command not found
> grep python /usr/local/bin/mssql-cli
[...]
16:python -m mssqlcli.main "$@"

All other Python scripts installed via pip in /usr/local/bin refer to python3[.8].

ellbosch commented 4 years ago

@thorstenkampe what OS are you using to install mssql-cli?

thorstenkampe commented 4 years ago

@ellbosch I'm using Ubuntu 18.04

ellbosch commented 4 years ago

As of fairly recently we've published a version to apt-get that should work on Ubuntu 18.04. Best to uninstall mssql-cli first using pip3 uninstall mssql-cli and then follow these instructions:

# Installs mssql-cli from Packages.Microsoft
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

# Use for pulling from prod channel
RUN apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod

RUN apt-get update
RUN apt-get install -y mssql-cli

# Installs missing requirements
RUN apt-get install -y -f

Please let me know if this resolves your problem.

thorstenkampe commented 4 years ago

Sorry, the packages creates

ellbosch commented 4 years ago

Interesting bug there... can you pass along the response you get for calling arch in the command line?

FYI—we bundle our own Python version with apt-get and yum packages to prevent potential conflicts with Python dependencies downloaded elsewhere. There may be some issues if you attempt a purist Python installation on Linux.

thorstenkampe commented 4 years ago

I have to correct myself: the distribution is not 18.04 but 19.10, the latest version of Ubuntu.

I guess I have to wait until 20.04 becomes supported.

ellbosch commented 4 years ago

Sorry @thorstenkampe, we don't support 19.10 at this time. Closing this issue.