Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install the pyodbc package #49

Open
thetestgame opened this issue Feb 6, 2020 · 2 comments
Open

Unable to install the pyodbc package #49

thetestgame opened this issue Feb 6, 2020 · 2 comments

Comments

@thetestgame
Copy link

We are currently unable to use SQL Server on our Python App Service instance due to an error preventing the install of pyodbc from pip.

    Running setup.py install for pyodbc ... error
    ERROR: Command errored out with exit status 1:
     command: /opt/python/3/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hu419imp/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-hu419imp/pyodbc/s
etup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/
pip-record-dl7e4jt2/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-hu419imp/pyodbc/
    Complete output (10 lines):
    running install
    running build
    running build_ext
    building 'pyodbc' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/src
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0.28 -I/opt/python/3/include/python3.7m -c src/buffer.cpp -o build/temp.linux-x86_64-3.7/s
rc/buffer.o -Wno-write-strings
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
Cleaning up...
ERROR: Command errored out with exit status 1: /opt/python/3/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hu419imp/pyodbc/setup.py'"'"'; __file__='"'"'/
tmp/pip-install-hu419imp/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'ex
ec'"'"'))' install --record /tmp/pip-record-dl7e4jt2/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
@jaceaser
Copy link

jaceaser commented Feb 13, 2020

@thetestgame I was able to get it installed by running the below commands, however when I deploy the application it fails.

apt-get install build-essential libssl-dev libffi-dev python3-dev
apt-get install unixodbc-dev

this has me puzzled.

@thetestgame
Copy link
Author

thetestgame commented Feb 14, 2020

I had the same result. When you deploy an application it seems to reset the container effectively uninstalling everything. At least from my experience deploying from Visual Studio Code. If I deploy and hand install everything via ssh then it works as intended but next deploy its wiped again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants