1

I'm trying to install SAIO as http://docs.openstack.org/developer/swift/development_saio.html#common-dev-section

when I nuild a development installation of swift by

pip install -r requirements.txt

I got this error:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 262, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1632, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 173, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 71, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2667, in parse
    reqs = list(parse_requirements(s))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2583, in scan_list
    "Expected ',' or end-of-list in",line,"at",line[p:]
ValueError: ("Expected ',' or end-of-list in", "dnspython3>=1.12.0;python_version<'3.0'", 'at', ";python_version<'3.0'")

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

here is my requirement.txt

dnspython3>=1.12.0;python_version<'3.0'
dnspython3>=1.12.0;python_version>='3.0'
eventlet>=0.17.4  # MIT
greenlet>=0.3.1
netifaces>=0.5,!=0.10.0,!=0.10.1
pastedeploy>=1.3.3
six>=1.9.0
xattr>=0.4
PyECLib>=1.2.0                          # BSD
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
Nguyen Diep
  • 85
  • 1
  • 9

2 Answers2

0

The support for Environment Markers was added on pip version 6.0, you might have an older version. You can upgrade pip using:

pip install --upgrade pip
Forge
  • 6,538
  • 6
  • 44
  • 64
0

Same problem for me and I cannot upgrade pip with the command given by @Forge:

pip install --upgrade pip


root@1c86632c84e6:/# pip install --upgrade pip 
Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.4
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...
root@1c86632c84e6:/# pip --version 
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)

I wonder if unstalling pip with pip should work ...

jmcollin92
  • 2,896
  • 6
  • 27
  • 49
  • The crucial line here is `Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS`. There are several ways around this issue, with the recommended way being to use `virtualenv` to create an isolated Python environment and update its version of `pip`. – taleinat Jun 30 '16 at 14:41