I'm trying to install a couple of packages for Python 3.5 (pyodbc, pandas), but the process is getting stuck. The first thing I tried is:
C:\Program Files (x86)\Python 3.5\Scripts> pip install pyodbc
This gives me the following
Traceback (most recent call last):
File "C:\Program Files (x86)\Python 3.5\Scripts\pip-script.py", line 9, in <module> load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\pkg_resources\__init__.py", line 552, in load_entry_point return get_distribution(dist).load_entry_point(group, name)
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\pkg_resources\__init__.py", line 2672, in load_entry_point
return ep.load()
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\pkg_resources\__init__.py", line 2345, in load return self.resolve()
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\pkg_resources\__init__.py", line 2351, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\pip-8.1.2-py3.5.egg\pip\__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\pip-8.1.2-py3.5.egg\pip\utils\__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
ImportError: cannot import name 'pkg_resources'
I then try
C:\Program Files (x86)\Python 3.5\Scripts> pip install pkg_resources
which yields the same pkg_resources error.
Next I try
C:\Program Files (x86)\Python 3.5\Scripts> easy_install-3.5 install pkg_resources
and
C:\Program Files (x86)\Python 3.5\Scripts> easy_install-3.5 pkg_resources
which both yield
Searching for pkg-resources
Reading https://pypi.python.org/simple/pkg_resources/
No local packages or download links found for pkg-resources error: Could not find suitable distribution for Requirement.parse('pkg-resources')
Upon further searching, it was suggested that setuptools might be out of date. Currently I have setuptools 16.0, while the latest I see is 25.1.6. When I try to update setuptools using pip,
C:\Program Files (x86)\Python 3.5\Scripts> pip install -U setuptools
I receive the pkg_resources error again. If I use easy_install-3.5 to update instead, it installs the 16.0 version all over again.
Next I tried to manually install setuptools by downloading the .whl file.
C:\Program Files (x86)\Python 3.5\Scripts>pip install "C:\Users\xxxx\Downloads\setuptools-25.1.6-py2.py3-none-any.whl"
but that gives the pkg_resources error again.
Since my goal is to simply get the packages installed, I've also tried
C:\Program Files (x86)\Python 3.5\Scripts> easy_install-3.5 install pyodbc
which gives the same No Local packages or download links error as above. Instead if I run
C:\Program Files (x86)\Python 3.5\Scripts> easy_install-3.5 pyodbc
I get
C:\Program Files (x86)\Python 3.5\Scripts>easy_install-3.5 pyodbc
Searching for pyodbc
Reading https://pypi.python.org/simple/pyodbc/
Best match: pyodbc 3.0.10
Downloading https://pypi.python.org/packages/9c/6f/27ffd47f56226e572bb8cf06a8355d8ed875b49b8317e73a95c20fb599d1/pyodbc-3.0.10.tar.gz#md5=3f6f205c979a0fe5dee05d37121a7b92
Processing pyodbc-3.0.10.tar.gz
Writing C:\Users\xxxx\AppData\Local\Temp\easy_install-97z1da15\pyodbc-3.0.10\setup.cfg
Running pyodbc-3.0.10\setup.py -q bdist_egg --dist-dir C:\Users\xxxx\AppData\Local\Temp\easy_install-97z1da15\pyodbc-3.0.10\egg-dist-tmp-00jdn31z
error: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\xxxxx\\AppData\\Local\\Temp\\easy_install-97z1da15\\pyodbc-3.0.10\\pyodbc.egg-info\\SOURCES.txt'
Any ideas?