Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8087 > unrolled thread

upgrading setuptools in virtualenv leaves behind version 5.5.1

Started byBrian May <brian@linuxpenguins.xyz>
First post2016-01-13 08:50 +0100
Last post2016-01-13 22:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  upgrading setuptools in virtualenv leaves behind version 5.5.1 Brian May <brian@linuxpenguins.xyz> - 2016-01-13 08:50 +0100
    Re: upgrading setuptools in virtualenv leaves behind version 5.5.1 Andrey Rahmatullin <wrar@debian.org> - 2016-01-13 11:30 +0100
      Re: upgrading setuptools in virtualenv leaves behind version 5.5.1 Brian May <bam@debian.org> - 2016-01-13 22:40 +0100

#8087 — upgrading setuptools in virtualenv leaves behind version 5.5.1

FromBrian May <brian@linuxpenguins.xyz>
Date2016-01-13 08:50 +0100
Subjectupgrading setuptools in virtualenv leaves behind version 5.5.1
Message-ID<qQolQ-4RO-15@gated-at.bofh.it>
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/

[toc] | [next] | [standalone]


#8088

FromAndrey Rahmatullin <wrar@debian.org>
Date2016-01-13 11:30 +0100
Message-ID<qQqQF-6Le-1@gated-at.bofh.it>
In reply to#8087
On Wed, Jan 13, 2016 at 06:43:31PM +1100, Brian May wrote:
> Running virtualenv with interpreter /tmp/bbb/bin/python2
Huh?

> 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.
It's the version installed by virtualenv, from the python-setuptools-whl
package.

> 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 don't see where did you install the new version.

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#8091

FromBrian May <bam@debian.org>
Date2016-01-13 22:40 +0100
Message-ID<qQBj6-5yt-61@gated-at.bofh.it>
In reply to#8088
Andrey Rahmatullin <wrar@debian.org> writes:

>> 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 don't see where did you install the new version.

Sorry, somehow I managed to stuff up the copy and paste. I actually run
"pip install -U setuptools" as below.

brian@prune:~$ rm -rf /tmp/virtual/
brian@prune:~$ virtualenv /tmp/virtual
Running virtualenv with interpreter /home/brian/.pyenv/shims/python2
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:~$ pip install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/3.5/s/setuptools/setuptools-19.2-py2.py3-none-any.whl#md5=7bdac510b6bc1675a2a149eb3f81af77
  Downloading setuptools-19.2-py2.py3-none-any.whl (463kB): 463kB downloaded
Installing collected packages: setuptools
  Found existing installation: setuptools 5.5.1
    Uninstalling setuptools:
      Successfully uninstalled setuptools
Successfully installed setuptools
Cleaning up...
(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 14 08:31 /tmp/virtual/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl
-- 
Brian May <bam@debian.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web