I am running MacOS 10.11.6 (El Capitan) on an iMac. I have set up a Python 3.4.7 virtual environment and I have pip (9.0.1) installed various packages including numpy, pandas, scipy etc. However, I'm having difficulty installing pymssql using. I understand that I need to install FreeTDS first and I have done that using fink (which installed freetds version 0.91-5). However, when I activate a virtual environment and run:
pip install pymssql
I get the following error message (apologies for the size of it):
Collecting pymssql
Using cached pymssql-2.1.3.tar.gz
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_git/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600) -- 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:600) -- 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:600) -- Some packages may not be found!
No local packages or working download links found for setuptools_git
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/75/qtnqhywh8xj9760059b8dbd80000gq/T/pip-build-pyxahulz/pymssql/setup.py", line 477, in <module>
ext_modules = ext_modules(),
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/setuptools/dist.py", line 453, in fetch_build_eggs
replace_conflicting=True,
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 866, in resolve
replace_conflicting=replace_conflicting
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1146, in best_match
return self.obtain(req, installer)
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1158, in obtain
return installer(requirement)
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/setuptools/dist.py", line 520, in fetch_build_egg
return cmd.easy_install(req)
File "/Users/xyz/Documents/python_projects/general_python34_projects/env34/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_git')
setup.py: platform.system() => 'Darwin'
setup.py: platform.architecture() => ('64bit', '')
setup.py: platform.libc_ver() => ('', '')
setup.py: Detected Darwin/Mac OS X.
You can install FreeTDS with Homebrew or MacPorts, or by downloading
and compiling it yourself.
Homebrew (http://brew.sh/)
--------------------------
brew install freetds
MacPorts (http://www.macports.org/)
-----------------------------------
sudo port install freetds
setup.py: Not using bundled FreeTDS
setup.py: include_dirs = ['/sw/include']
setup.py: library_dirs = ['/usr/local/lib', '/sw/lib', '/opt/local/lib']
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/75/qtnqhywh8xj9760059b8dbd80000gq/T/pip-build-pyxahulz/pymssql/
Online instructions describe using Homebrew to install FreeTDS but I've always used fink and don't want to cause conflicts with code installed by two systems.
I've updated fink and pip and I've installed the latest setuptools.
I've tried running:
pip install --global-option=build_ext --global-option="-L/sw/lib" --global-option="-I/sw/include" pymssql
...but no luck.
And I've tried installing an earlier version of pymssql:
pip install pymssql==2.1.1
Again, no joy.
Or is the 'certificate verify failed' comment at the start of the error output the key?
I'm sure I've install MSSQL previously on other machines and I don't recall a problem. I also don't recall what I did differently (if anything).
Can anyone help me to resolve this issue, please.