upgrading setuptools in virtualenv leaves behind version 5.5.1
Is this a bug? Feature? On Debian stable:
brian@prune:~$ virtualenv /tmp/virtual
Running virtualenv with interpreter /tmp/bbb/bin/python2
Using real prefix '/usr'
New python executable in /tmp/virtual/bin/python2
Also creating executable in /tmp/virtual/bin/python
Installing setuptools, pip...done.
brian@prune:~$ . /tmp/virtual/bin/activate
(virtual)brian@prune:~$ ls -l /tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl
-rw------- 1 brian brian 229854 Jan 13 18:34 /tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl
So the old version of setuptools is still there.
Problem is some packages will pickup pkg_resources from
setuptools-5.5.1-py2.py3-none-any.whl instead of the new version I just
thought I installed.
I can't seem to reproduce this with manual imports, however I do get
this problem when using setuptools-scm:
(virtual)brian@prune:~/tree/sshuttle$ pip install -e .
Obtaining file:///home/brian/tree/sshuttle
Running setup.py (path:/home/brian/tree/sshuttle/setup.py) egg_info for package from file:///home/brian/tree/sshuttle
Installed /home/brian/tree/sshuttle/.eggs/setuptools_scm-1.10.1-py2.7.egg
Cleaning up...
Exception:
Traceback (most recent call last):
File "/tmp/virtual/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/tmp/virtual/local/lib/python2.7/site-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/tmp/virtual/local/lib/python2.7/site-packages/pip/req.py", line 1146, in prepare_files
req_to_install.run_egg_info()
File "/tmp/virtual/local/lib/python2.7/site-packages/pip/req.py", line 331, in run_egg_info
"%(Name)s==%(Version)s" % self.pkg_info())
File "/tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2793, in parse
reqs = list(parse_requirements(s))
File "/tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2721, in parse_requirements
"version spec")
File "/tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2697, in scan_list
raise ValueError(msg, line, "at", line[p:])
ValueError: ("Expected ',' or end-of-list in", u'sshuttle==0.76.dev2+ngd395bdb', 'at', u'+ngd395bdb')
Storing debug log for failure in /home/brian/.pip/pip.log
The exception itself here isn't so important, what was important is the
traceback showing setuptools 5.5.1
If I delete
/tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl
manually, then it works fine.
--
Brian May <brian@linuxpenguins.xyz>
https://linuxpenguins.xyz/brian/
Reply to: