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

Can't install recent version using pip in alpine #434

Closed simon-wessel closed 4 years ago

simon-wessel commented 4 years ago

Hi, I'm trying to install mssql-cli version 0.18.0 in my Docker container using python:3.6.10-alpine3.11, but it falls back to version 0.3.0.

Test docker file:

FROM python:3.6.10-alpine3.11
#RUN pip3 install cython
#RUN apk add gcc musl-dev unixodbc unixodbc-dev freetds-dev
RUN pip3 install mssql-cli==0.18.0

Error:

Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM python:3.6.10-alpine3.11
 ---> 781b53c4648c
Step 2/2 : RUN pip3 install mssql-cli==0.18.0
 ---> Running in 5c2be75962ec
ERROR: Could not find a version that satisfies the requirement mssql-cli==0.18.0 (from versions: 0.1, 0.2, 0.3)
ERROR: No matching distribution found for mssql-cli==0.18.0
The command '/bin/sh -c pip3 install mssql-cli==0.18.0' returned a non-zero code: 1

The issue seems to be related to #236.

Kind regards

ellbosch commented 4 years ago

Hi @simon-wessel, this is related to #417—we don't support Alpine yet. What's happening here, I expect at least, is that pip is looking back at our older releases which contain source distributions and attempts to use those for installation. Unfortunately this isn't likely to work for your environment.

If you're going the Docker route and are flexible on your Linux environment, I recommend using one of our supported Linux environments. We support apt-get and yum and I expect new stable bits to be uploaded in the next few days!

Thanks for sharing this :) it's good to know about interest in Alpine support.

datfinesoul commented 4 years ago

I'm actually running into the same thing, trying to get mssql-cli installed on alpine. Would be great if this is eventually supported. I'll post the install commands I used and the final pip show below.

apk add freetds-dev
pip install Cython
pip install mssql-cli

bash-4.4# pip show mssql-cli
Name: mssql-cli
Version: 0.3
Summary: A way to run queries and execute commands against an MSSQL database.
Home-page: http://github.com/seanchon/mssql_cli/
Author: Sean Chon
Author-email: s@seanchon.com
License: MIT
Location: /usr/local/lib/python3.6/site-packages
Requires: pymssql
Required-by: