Ask Your Question
1

Keystone-all - ImportError: cannot import name deploy

asked 2014-02-05 03:40:57 -0500

updated 2014-02-05 09:21:09 -0500

Hi all,

I've installed havana release:

yum install -y http://repos.fedorapeople.org/repos/openstack/openstack-havana/rdo-release-havana-7.noarch.rpm
yum install -y openstack-packstack
packstack --allinone --os-neutron-install=n --os-ceilometer-install=n

Then, I've configured LDAP. So fa so good.

Now, I want to apply the master branch from keystone github.

git clone https://github.com/openstack/keystone.git
cd keystone
python setup.py install

There were no problems.

But now, when I try to run keystone server, it raises this error:

# keystone-all
Traceback (most recent call last):
  File "/usr/bin/keystone-all", line 35, in <module>
    from paste import deploy
ImportError: cannot import name deploy

Even using python prompt:

# pip install PasteDeploy
Requirement already satisfied (use --upgrade to upgrade): PasteDeploy in /usr/lib/python2.6/site-packages/PasteDeploy-1.5.2-py2.6.egg
Cleaning up...

# python
>>> from paste import deploy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name deploy

These are the list of installed libraries related to pastedeploy:

# ls /usr/lib/python2.6/site-packages/Paste
Paste-1.7.4-py2.6.egg-info/  PasteDeploy-1.5.0-py2.6.egg/
Paste-1.7.4-py2.6-nspkg.pth  PasteDeploy-1.5.2-py2.6.egg/

Any idea?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2014-02-05 08:32:24 -0500

My solution was:

yum -y install python-routes
yum -y install python-paste-deploy
edit flag offensive delete link more

Comments

thanks for sharing

smaffulli gravatar imagesmaffulli ( 2014-02-05 10:48:38 -0500 )edit

Also, I put a bugzilla report here https://bugzilla.redhat.com/show_bug.cgi?id=1061768

Marcos F. Lobo gravatar imageMarcos F. Lobo ( 2014-02-06 05:22:04 -0500 )edit
1

answered 2016-02-09 15:35:25 -0500

Mark Hamzy gravatar image

You need to uninstall and reinstall PasteDeploy via pip. Somehow

pip install -U -r /opt/nova/requirements.txt

did not work the way it was supposed to.

root@pkvmci829:~# pip show PasteDeploy | grep Location
Location: /usr/lib/python2.7/dist-packages
root@pkvmci829:~# ls /usr/lib/python2.7/dist-packages/paste/
ls: cannot access /usr/lib/python2.7/dist-packages/paste/: No such file or directory
root@pkvmci829:~# pip uninstall PasteDeploy
Uninstalling PasteDeploy-1.5.2:
  /usr/lib/python2.7/dist-packages/PasteDeploy-1.5.2.egg-info
Proceed (y/n)?
root@pkvmci829:~# pip uninstall --yes PasteDeploy && pip install 'PasteDeploy>=1.5.0'  
root@pkvmci829:~# python -c 'from paste import deploy'
edit flag offensive delete link more

Comments

Works! For some reason, PasteDeploy wasn't installed, and Devstack didn't install it (probably due to leftovers from previous deploys).

rafaelfolco gravatar imagerafaelfolco ( 2016-07-20 11:08:15 -0500 )edit
0

answered 2014-02-07 06:03:29 -0500

updated 2014-02-07 06:05:31 -0500

Note be careful with solution 1 as it could very well install older version of paste-deploy that could cause further issues down the line. The main issue is a mixing of git and packages, and the former doesn't knkow how to reference the correct parallel installed version of packages on this platform. For more details on possible worarounds see rhbz#1061768#c1

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-05 03:40:57 -0500

Seen: 5,643 times

Last updated: Feb 07 '14