Reputation: 1182
I'm trying to create a new environment and install various 3rd party packages on an Ubuntu machine. After having to install condo (for a matplotlib
installation) and gdal
, the pip
function no longer works. Instead I receive:
Traceback (most recent call last):
File "/media/imagery/ENVIRONMENTS/Project_1/bin/pip", line 7, in <module>
from pip._internal import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 30, in <module>
from pip._vendor.retrying import retry
ImportError: No module named retrying
I've called pip both in and outside my environment, and still observe the same issue. Also I've tried a pip install --upgrade pip
and still retrieve the same Traceback. Any ideas how to resolve this?
Upvotes: 1
Views: 7022
Reputation: 27796
I had a similar exception and could manage to repair it.
In my case I upgraded Ubuntu 16.04 to Ubuntu 18.04.
I had to re-create the virtualenv. Depending on your choice:
virtualenv .
Or
virtualenv --system-site-packages .
Upvotes: 0
Reputation: 1182
As a cheap workaround, export PYTHONPATH=" "
seemed to work for now in order to install other packages, but as soon as I need the gdal package, I have to then set PYTHONPATH
again.
Upvotes: 3