pip install requirements error with python_version=='2.7'

Bug #1468339 reported by Haifeng.Yan
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
devstack
New
Undecided
Unassigned

Bug Description

devstack insall heat requirements failed with this line in requirements.txt
"qpid-python;python_version=='2.7'"

log:

2015-06-24 12:36:21.151 | + cd /home/evan/devstack
2015-06-24 12:36:21.151 | + setup_develop /opt/stack.lates/heat
2015-06-24 12:36:21.152 | + local project_dir=/opt/stack.lates/heat
2015-06-24 12:36:21.152 | + setup_package_with_req_sync /opt/stack.lates/heat -e
2015-06-24 12:36:21.152 | + local project_dir=/opt/stack.lates/heat
2015-06-24 12:36:21.152 | + local flags=-e
2015-06-24 12:36:21.153 | ++ cd /opt/stack.lates/heat
2015-06-24 12:36:21.154 | ++ git diff --exit-code
2015-06-24 12:36:21.340 | ++ echo changed
2015-06-24 12:36:21.341 | + local update_requirements=changed
2015-06-24 12:36:21.341 | + [[ changed != \c\h\a\n\g\e\d ]]
2015-06-24 12:36:21.342 | + setup_package /opt/stack.lates/heat -e
2015-06-24 12:36:21.343 | + local project_dir=/opt/stack.lates/heat
2015-06-24 12:36:21.343 | + local flags=-e
2015-06-24 12:36:21.343 | + pip_install -e /opt/stack.lates/heat
2015-06-24 12:36:21.974 | + sudo -H http_proxy=http://xxxxx:8080/ https_proxy=https://xxxxx:8080/ no_proxy= PIP_FIND_LINKS=file:///opt/stack.kilo/.wheelhouse /usr/local/bin/pip install -e /opt/stack.lates/heat
2015-06-24 12:36:23.318 | Obtaining file:///opt/stack.lates/heat
2015-06-24 12:36:25.170 | Exception:
2015-06-24 12:36:25.171 | Traceback (most recent call last):
2015-06-24 12:36:25.171 | File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 223, in main
2015-06-24 12:36:25.172 | status = self.run(options, args)
2015-06-24 12:36:25.172 | File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 291, in run
2015-06-24 12:36:25.173 | wb.build(autobuilding=True)
2015-06-24 12:36:25.173 | File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 705, in build
2015-06-24 12:36:25.173 | self.requirement_set.prepare_files(self.finder)
2015-06-24 12:36:25.173 | File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 317, in prepare_files
2015-06-24 12:36:25.173 | functools.partial(self._prepare_file, finder))
2015-06-24 12:36:25.173 | File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 304, in _walk_req_to_install
2015-06-24 12:36:25.174 | more_reqs = handler(req_to_install)
2015-06-24 12:36:25.174 | File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 539, in _prepare_file
2015-06-24 12:36:25.174 | set(req_to_install.extras) - set(dist.extras)
2015-06-24 12:36:25.175 | File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2758, in extras
2015-06-24 12:36:25.175 | return [dep for dep in self._dep_map if dep]
2015-06-24 12:36:25.175 | File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2575, in _dep_map
2015-06-24 12:36:25.175 | dm.setdefault(extra,[]).extend(parse_requirements(reqs))
2015-06-24 12:36:25.175 | File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2904, in parse_requirements
2015-06-24 12:36:25.175 | "version spec")
2015-06-24 12:36:25.176 | File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2869, in scan_list
2015-06-24 12:36:25.176 | raise ValueError(msg, line, "at", line[p:])
2015-06-24 12:36:25.177 | ValueError: ('Expected version spec in', "qpid-python;python_version=='2.7'", 'at', ";python_version=='2.7'")

if pip install -r requirements.txt, it can work. so I think this problem may be caused by install script of devstack

Haifeng.Yan (yanheven)
summary: - pip install requirements error
+ pip install requirements error with python_version=='2.7'
Haifeng.Yan (yanheven)
description: updated
Revision history for this message
Rajkumar Kuppuraj (krajkumarit) wrote :

Hi - I'm also facing this error when trying to install devstack.
Please do we have any updates on this bug fix?.

Thanks,
-Raj

Revision history for this message
Haifeng.Yan (yanheven) wrote :

I found that when execute "pip install -e /opt/stack.lates/heat" will failed, but "pip insall -r /opt/stack.lates/heat/requirements.txt" will successfully.
I solve this problem by editing requirements.txt as below:

qpid-python #;python_version=='2.7'

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

The line "qpid-python; python_version=='2.7'" is perfectly valid. You need recent versions of pbr, setuptools and pip for it to work though. Something like:

$ pip list | grep -E "(pip|pbr|setuptools)"
pbr (1.2.0)
pip (7.0.3)
setuptools (18.0)

Revision history for this message
Ken Chen (ken-chen-i) wrote :

Hi it is because of keystone bug https://bugs.launchpad.net/keystone/+bug/1468976. If you are using keystonemiddleware<2.0 version, which will downgrade your pbr to 0.11.0 (if your have a higher version pbr installed), while it is not compatible with this line.
You can upgrade your keystonemiddleware to 2.0.0 to avoid this issue.

Revision history for this message
Ken Chen (ken-chen-i) wrote :

I checked the issue again, it seems test_requirements.txt was modified by devstack? In the original test_requirements.txt, the line was

qpid-python

However, in devstack setup, it will be modifed to

qpid-python ;python_version=='2.7'

Anyway, upgrading keystonemiddleware to 2.0.0 and pbr to 1.2.0 can resolve this issue.

Revision history for this message
Ken Chen (ken-chen-i) wrote :

btw python-openstackclient should be upgraded too, or it also might downgrade your pbr version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.