I have a Docker Image that's built from this docker file. The docker image is with a Vagrant VM which is Ubuntu 14.04 and I'm running it all in OSX 10.11.6. The Microsoft SQL Server is in an aws-ec2 instance. Since my program is in Python, I have tried 2 python libraries for connecting to the database, but each fail in the same way. Here's an overview of what's happened so far:
apk add freetds-dev
because FreeTDS needs to be installed for interacting with Microsoft SQL databases.pip install pymssql
andpip install pyobdc
both fail with the same error message:
{ bash-4.3# pip install pymssql
Collecting pymssql
Using cached pymssql-2.1.3.tar.gz
Complete output from command python setup.py egg_info:
setup.py: platform.system() => 'Linux'
Download error on https://pypi.python.org/simple/setuptools_git/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-git/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'setuptools_git' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for setuptools-git
setup.py: platform.architecture() => ('64bit', '')
setup.py: platform.linux_distribution() => ('', '', '')
setup.py: platform.libc_ver() => ('', '')
setup.py: Not using bundled FreeTDS
setup.py: include_dirs = []
setup.py: library_dirs = ['/usr/local/lib']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-macbkK/pymssql/setup.py", line 477, in <module>
ext_modules = ext_modules(),
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 846, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1091, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1103, in obtain
return installer(requirement)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 633, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-git')
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-macbkK/pymssql/
(It's the same error with pyodbc
) When I try install setuptools-git
(like the error message says), I get a gcc
compile error.
In addition to trying pip install...
, I've downloaded the SQLAlchemy library directly from the Alpine Linux repo using apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ py-sqlalchemy
and the installs still fail/python libraries still fail.
I have found very little documentation on Alpine Linux and Microsoft SQL Server, so I'm wondering if I've missed something that says they're not compatible. Has anyone tried doing this before? If connecting via Python isn't suggested, I am considering connecting via Shell commands, can anyone suggest best practices for this?
Thank you!