Python Install Packages Error (cannot import name 'pkg_resources')
<p>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:</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; pip install pyodbc
</code></pre>

<p>This gives me the following</p>

<pre><code>Traceback (most recent call last):
  File "C:\Program Files (x86)\Python 3.5\Scripts\pip-script.py", line 9, in &lt;module&gt; 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 &lt;module&gt;
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 &lt;module&gt;
from pip._vendor import pkg_resources
ImportError: cannot import name 'pkg_resources'
</code></pre>

<p>I then try</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; pip install pkg_resources
</code></pre>

<p>which yields the same pkg_resources error.</p>

<p>Next I try</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; easy_install-3.5 install pkg_resources
</code></pre>

<p>and</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; easy_install-3.5 pkg_resources
</code></pre>

<p>which both  yield</p>

<pre><code>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')
</code></pre>

<p>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,</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; pip install -U setuptools
</code></pre>

<p>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. </p>

<p>Next I tried to manually install setuptools by downloading the .whl file. </p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt;pip install "C:\Users\xxxx\Downloads\setuptools-25.1.6-py2.py3-none-any.whl"
</code></pre>

<p>but that gives the pkg_resources error again.</p>

<p>Since my goal is to simply get the packages installed, I've also tried</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; easy_install-3.5 install pyodbc
</code></pre>

<p>which gives the same No Local packages or download links error as above. Instead if I run</p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt; easy_install-3.5 pyodbc
</code></pre>

<p>I get </p>

<pre><code>C:\Program Files (x86)\Python 3.5\Scripts&gt;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'
</code></pre>

<p>Any ideas?</p>