I see this error message below. The client previously worked on exactly the same environment. I don't understand anything from Python.
How can I fix this? My current certificate expires in a couple of hours.
// a lot of other stuff updated ...
Setting up gcc (4:6.3.0-4) ...
Setting up python-virtualenv (15.1.0+ds-1) ...
Processing triggers for libc-bin (2.24-5) ...
Processing triggers for ca-certificates (20161130) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Creating virtual environment...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 662, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 970, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 861, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (virtualenv 15.0.3 (/usr/lib/python3/dist-packages), Requirement.parse('virtualenv==15.1.0'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2991, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2977, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3004, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 664, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 677, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 856, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'virtualenv==15.1.0' distribution was not found and is required by the application
pip uninstall virtualenv
/pip install virtualenv==15.1.0
– chrki Apr 19 '17 at 20:17Creating virtual environment...
with the error mentioned above. Feels like there was a change (like what @chrki mentioned) there. I'd start chasing it from there... did an install fail (previously)? Did someone update this? etc. – AlG Apr 19 '17 at 20:19python -m pip install virtualenv==15.1.0
(might work if pip is installed but not in your PATH, otherwise you have to install it:sudo apt-get install python3-pip
- or it might actually be calledpip3
since you are using Python3 – chrki Apr 19 '17 at 20:24