ValueError with pip virtualenv

This is my first time using virtualenv options with pip.
I was finding that i got errors about wheel if i installed pip without the no-use-wheel, so i pass it in as extra_args

  • name: Upgrade setuptools
    pip: virtualenv=“{{default_virtualenv}}”
    name=setuptools extra_args=upgrade,no-use-wheel

Which gives error:

TASK: [linux_osx_common | Upgrade setuptools] *********************************

failed: [prod-pivot] => {“cmd”: “ENV1/bin/pip install upgrade,no-use-wheel --use-mirrors setuptools”, “failed”: true, “item”: “”}

msg: stdout: New python executable in ENV1/bin/python

Installing setuptools, pip…done.

–use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.

Exception:

Traceback (most recent call last):

File “/tmp/ENV1/lib/python2.6/site-packages/pip/basecommand.py”, line 122, in main

status = self.run(options, args)

File “/tmp/ENV1/lib/python2.6/site-packages/pip/commands/install.py”, line 253, in run

InstallRequirement.from_line(name, None))

File “/tmp/ENV1/lib/python2.6/site-packages/pip/req.py”, line 172, in from_line

return cls(req, comes_from, url=url, prereleases=prereleases)

File “/tmp/ENV1/lib/python2.6/site-packages/pip/req.py”, line 70, in init

req = pkg_resources.Requirement.parse(req)

File “/tmp/ENV1/lib/python2.6/site-packages/pip/_vendor/pkg_resources.py”, line 2606, in parse

reqs = list(parse_requirements(s))

File “/tmp/ENV1/lib/python2.6/site-packages/pip/_vendor/pkg_resources.py”, line 2544, in parse_requirements

line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),“version spec”)

File “/tmp/ENV1/lib/python2.6/site-packages/pip/_vendor/pkg_resources.py”, line 2512, in scan_list

raise ValueError(“Expected “+item_name+” in”,line,“at”,line[p:])

ValueError: (‘Expected version spec in’, ‘upgrade,no-use-wheel’, ‘at’, ‘,no-use-wheel’)

Storing debug log for failure in /root/.pip/pip.log

FATAL: all hosts have already failed – aborting

(ENV1)[**root@prod-pivot:~****]** pip install setuptools --upgrade --no-use-wheel

Downloading/unpacking setuptools from https://pypi.python.org/packages/source/s/setuptools/setuptools-2.2.tar.gz#md5=04a7664538957b832710653fd7d5b4e6

Downloading setuptools-2.2.tar.gz (786kB): 786kB downloaded

Running setup.py (path:/root/venvs/ENV1/build/setuptools/setup.py) egg_info for package setuptools

Can you please file a github ticket on this?

Thanks!

Kesten,

Have you tried ‘extra_args=“–upgrade --no-use-wheel”’ ?

I tried it. The error is slightly different but similar

Filing a ticket.

TASK: [linux_osx_common | Upgrade setuptools] *********************************

failed: [prod-pivot] => {“cmd”: “ENV1/bin/pip install upgrade no-use-wheel --use-mirrors setuptools”, “failed”: true, “item”: “”}

msg: stdout: New python executable in ENV1/bin/python

Installing setuptools, pip…done.

–use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.

Downloading/unpacking upgrade

Could not find any downloads that satisfy the requirement upgrade

Cleaning up…

No distributions at all found for upgrade

Storing debug log for failure in /root/.pip/pip.log

FATAL: all hosts have already failed – aborting