Recently I ran into this error when I was trying devstack:
ERROR: openstackclient.shell Exception raised: python-neutronclient 2.3.9.40.g9ed73c0 is installed but python-neutronclient<3,>=2.3.6 is required by []
I did some investigation and found it perhaps is caused by python path issue.
There are two suite of openstack client installations (such as python-neutronclient, python-novaclient, etc.) under /opt/stack/ directory and /usr/local/lib/python2.7/dist-packages directory. Take neutronclient as the example, I can find it under these two directories:
/opt/stack/python-neutronclient
and
/user/local/lib/python2.7/dist-packages/python-neutronclient
I found python would use the clients installed under /opt/stack:
>>> sys.path
['', '/opt/stack/python-keystoneclient', '/opt/stack/python-glanceclient', ..., '/opt/stack/heat', '/opt/stack/tempest', '/usr/lib/python2.7'....]
why python(devstack) doesn't use the packages under the /usr/local/lib/python2.7? There is a problem with the package under /opt/stack: the version information in the egg-info/PKG-INFO is not a valid PEP440 version, such as '2.3.10.dev47.g11deb7f', and that will cause devstack failed with the above error when provisioning keystone:
I didn't remember I explicitly set PYTHONPATH variable. How python or devstack set the /opt/stack/ before the default system python path? I checked the devstack source code but didn't find any useful information. Could anyone help to give some hints? thanks!