New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests package 2.13 not supported yet #414

Closed
dirkpetersen opened this Issue Mar 31, 2017 · 12 comments

Comments

Projects
None yet
2 participants
@dirkpetersen
Copy link

dirkpetersen commented Mar 31, 2017

when I install fresh today

pip install --upgrade git+https://github.com/gc3-uzh-ch/elasticluster

dirk@rhino1:~$ elasticluster --version
Traceback (most recent call last):
File "/app/python2/2.7.9/bin/elasticluster", line 6, in
from pkg_resources import load_entry_point
File "/app/python2/2.7.9/lib/python2.7/site-packages/pkg_resources/init.py", line 3036, in
@_call_aside
File "/app/python2/2.7.9/lib/python2.7/site-packages/pkg_resources/init.py", line 3020, in _call_aside
f(*args, **kwargs)
File "/app/python2/2.7.9/lib/python2.7/site-packages/pkg_resources/init.py", line 3049, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/app/python2/2.7.9/lib/python2.7/site-packages/pkg_resources/init.py", line 656, in _build_master
return cls._build_from_requirements(requires)
File "/app/python2/2.7.9/lib/python2.7/site-packages/pkg_resources/init.py", line 669, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/app/python2/2.7.9/lib/python2.7/site-packages/pkg_resources/init.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.13.0 (/app/python2/2.7.9/lib/python2.7/site-packages), Requirement.parse('requests!=2.12.2,!=2.13.0,>=2.10.0')

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Mar 31, 2017

I cannot reproduce this issue. If I run the command you send in a new virtualenv
this is what I get::

$ mkvirtualenv elasticluster-issue-414
New python executable in elasticluster-issue-414/bin/python
Installing setuptools, pip, wheel...done.

(elasticluster-issue-414)$ pip install --upgrade setuptools
Collecting setuptools
  Downloading setuptools-34.3.3-py2.py3-none-any.whl (389kB)
    100% |████████████████████████████████| 393kB 837kB/s 
...    
Successfully installed appdirs-1.4.3 packaging-16.8 pyparsing-2.2.0 setuptools-34.3.3 six-1.10.0

(elasticluster-issue-414)$ pip install --upgrade git+https://github.com/gc3-uzh-ch/elasticluster
Collecting git+https://github.com/gc3-uzh-ch/elasticluster
  Cloning https://github.com/gc3-uzh-ch/elasticluster to /tmp/pip-UyBaWW-build
...  
Collecting python-novaclient (from elasticluster==1.3.dev0)
  Using cached python_novaclient-7.1.0-py2.py3-none-any.whl
...
Collecting requests!=2.12.2,>=2.10.0 (from python-novaclient->elasticluster==1.3.dev0)
  Using cached requests-2.13.0-py2.py3-none-any.whl
...
  Running setup.py install for elasticluster
Successfully installed ... elasticluster-1.3.dev0 ... python-novaclient-7.1.0 pytz-2017.2 requests-2.13.0 ...

It seems that the requests dependency comes from the python-novaclient
package (ElastiCluster itself does not use requests). What is the version of
python-novaclient that you have in your virtualenv?

@dirkpetersen

This comment has been minimized.

Copy link
Author

dirkpetersen commented Mar 31, 2017

I have this one

dirk@rhino1:~$ pip freeze | grep python-novaclient=
python-novaclient==7.1.0

but if I install the latest python-novaclient it actually installs 2.13 again:

root@rhino-d:/# pip install --upgrade python-novaclient
Requirement already up-to-date: python-novaclient in /app/python2/2.7.9/lib/python2.7/site-packages
Requirement already up-to-date: oslo.i18n>=2.1.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: oslo.serialization>=1.10.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: iso8601>=0.1.11 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: keystoneauth1>=2.18.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Collecting requests!=2.12.2,>=2.10.0 (from python-novaclient)
Using cached requests-2.13.0-py2.py3-none-any.whl
Requirement already up-to-date: oslo.utils>=3.18.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: pbr>=1.8 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: PrettyTable<0.8,>=0.7.1 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: Babel>=2.3.4 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: simplejson>=2.2.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: six>=1.9.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from python-novaclient)
Requirement already up-to-date: pytz>=2013.6 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.serialization>=1.10.0->python-novaclient)
Requirement already up-to-date: msgpack-python>=0.4.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.serialization>=1.10.0->python-novaclient)
Requirement already up-to-date: positional>=1.1.1 in /app/python2/2.7.9/lib/python2.7/site-packages (from keystoneauth1>=2.18.0->python-novaclient)
Requirement already up-to-date: stevedore>=1.20.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from keystoneauth1>=2.18.0->python-novaclient)
Requirement already up-to-date: monotonic>=0.6 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient)
Requirement already up-to-date: debtcollector>=1.2.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient)
Requirement already up-to-date: funcsigs>=0.4; python_version == "2.7" or python_version == "2.6" in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient)
Requirement already up-to-date: netifaces>=0.10.4 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient)
Requirement already up-to-date: pyparsing>=2.1.0 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient)
Requirement already up-to-date: netaddr!=0.7.16,>=0.7.13 in /app/python2/2.7.9/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient)
Requirement already up-to-date: wrapt in /app/python2/2.7.9/lib/python2.7/site-packages (from positional>=1.1.1->keystoneauth1>=2.18.0->python-novaclient)
Installing collected packages: requests
Found existing installation: requests 2.12.1
Uninstalling requests-2.12.1:
Successfully uninstalled requests-2.12.1
Successfully installed requests-2.13.0

@dirkpetersen

This comment has been minimized.

Copy link
Author

dirkpetersen commented Mar 31, 2017

I just tried again with python 2.7.13

root@rhino-d:/# pip install --upgrade git+https://github.com/gc3-uzh-ch/elasticluster
Collecting git+https://github.com/gc3-uzh-ch/elasticluster
Cloning https://github.com/gc3-uzh-ch/elasticluster to /tmp/pip-5ej7T5-build
Requirement already up-to-date: PyCLI in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Collecting ansible>=2.2.1 (from elasticluster==1.3.dev0)
Using cached ansible-2.2.2.0.tar.gz
Requirement already up-to-date: click>=4.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: coloredlogs in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: netaddr in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: paramiko in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: schema in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: boto in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: google-api-python-client in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Collecting google-compute-engine (from elasticluster==1.3.dev0)
Using cached google-compute-engine-2.3.5.tar.gz
Requirement already up-to-date: python-gflags in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: simplejson>=2.5.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Collecting pytz (from elasticluster==1.3.dev0)
Using cached pytz-2017.2-py2.py3-none-any.whl
Requirement already up-to-date: httplib2>=0.9.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: azure in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: netifaces in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Requirement already up-to-date: python-novaclient in /app/python2/2.7.13/lib/python2.7/site-packages (from elasticluster==1.3.dev0)
Collecting jinja2 (from ansible>=2.2.1->elasticluster==1.3.dev0)
Using cached Jinja2-2.9.5-py2.py3-none-any.whl
Requirement already up-to-date: PyYAML in /app/python2/2.7.13/lib/python2.7/site-packages (from ansible>=2.2.1->elasticluster==1.3.dev0)
Collecting setuptools (from ansible>=2.2.1->elasticluster==1.3.dev0)
Using cached setuptools-34.3.3-py2.py3-none-any.whl
Requirement already up-to-date: pycrypto>=2.6 in /app/python2/2.7.13/lib/python2.7/site-packages (from ansible>=2.2.1->elasticluster==1.3.dev0)
Requirement already up-to-date: humanfriendly>=2.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from coloredlogs->elasticluster==1.3.dev0)
Requirement already up-to-date: cryptography>=1.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: pyasn1>=0.1.7 in /app/python2/2.7.13/lib/python2.7/site-packages (from paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: uritemplate<4dev,>=3.0.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from google-api-python-client->elasticluster==1.3.dev0)
Requirement already up-to-date: oauth2client<5.0.0dev,>=1.5.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from google-api-python-client->elasticluster==1.3.dev0)
Requirement already up-to-date: six<2dev,>=1.6.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from google-api-python-client->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt==0.20.2 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-servicebus==0.20.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-storage==0.20.3 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-servicemanagement-legacy==0.20.2 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure->elasticluster==1.3.dev0)
Collecting Babel>=2.3.4 (from python-novaclient->elasticluster==1.3.dev0)
Using cached Babel-2.4.0-py2.py3-none-any.whl
Requirement already up-to-date: PrettyTable<0.8,>=0.7.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: pbr>=1.8 in /app/python2/2.7.13/lib/python2.7/site-packages (from python-novaclient->elasticluster==1.3.dev0)
Collecting oslo.utils>=3.18.0 (from python-novaclient->elasticluster==1.3.dev0)
Using cached oslo.utils-3.24.0-py2.py3-none-any.whl
Collecting requests!=2.12.2,>=2.10.0 (from python-novaclient->elasticluster==1.3.dev0)
Using cached requests-2.13.0-py2.py3-none-any.whl
Requirement already up-to-date: keystoneauth1>=2.18.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: iso8601>=0.1.11 in /app/python2/2.7.13/lib/python2.7/site-packages (from python-novaclient->elasticluster==1.3.dev0)
Collecting oslo.serialization>=1.10.0 (from python-novaclient->elasticluster==1.3.dev0)
Using cached oslo.serialization-2.18.0-py2.py3-none-any.whl
Collecting oslo.i18n>=2.1.0 (from python-novaclient->elasticluster==1.3.dev0)
Using cached oslo.i18n-3.15.0-py2.py3-none-any.whl
Requirement already up-to-date: MarkupSafe>=0.23 in /app/python2/2.7.13/lib/python2.7/site-packages (from jinja2->ansible>=2.2.1->elasticluster==1.3.dev0)
Requirement already up-to-date: appdirs>=1.4.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from setuptools->ansible>=2.2.1->elasticluster==1.3.dev0)
Requirement already up-to-date: packaging>=16.8 in /app/python2/2.7.13/lib/python2.7/site-packages (from setuptools->ansible>=2.2.1->elasticluster==1.3.dev0)
Requirement already up-to-date: monotonic; python_version == "2.6" or python_version == "2.7" or python_version == "3.0" or python_version == "3.1" or python_version == "3.2" in /app/python2/2.7.13/lib/python2.7/site-packages (from humanfriendly>=2.1->coloredlogs->elasticluster==1.3.dev0)
Collecting cffi>=1.4.1 (from cryptography>=1.1->paramiko->elasticluster==1.3.dev0)
Using cached cffi-1.10.0-cp27-cp27m-manylinux1_x86_64.whl
Requirement already up-to-date: asn1crypto>=0.21.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: idna>=2.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: enum34 in /app/python2/2.7.13/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: ipaddress in /app/python2/2.7.13/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: pyasn1-modules>=0.0.5 in /app/python2/2.7.13/lib/python2.7/site-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client->elasticluster==1.3.dev0)
Requirement already up-to-date: rsa>=3.1.4 in /app/python2/2.7.13/lib/python2.7/site-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt-network==0.20.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-mgmt==0.20.2->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt-compute==0.20.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-mgmt==0.20.2->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt-storage==0.20.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-mgmt==0.20.2->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt-resource==0.20.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-mgmt==0.20.2->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-common in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-servicebus==0.20.1->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: python-dateutil in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-storage==0.20.3->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-nspkg in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-storage==0.20.3->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: futures in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-storage==0.20.3->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: funcsigs>=0.4; python_version == "2.7" or python_version == "2.6" in /app/python2/2.7.13/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: pyparsing>=2.1.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: debtcollector>=1.2.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from oslo.utils>=3.18.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: stevedore>=1.20.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from keystoneauth1>=2.18.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: positional>=1.1.1 in /app/python2/2.7.13/lib/python2.7/site-packages (from keystoneauth1>=2.18.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: msgpack-python>=0.4.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from oslo.serialization>=1.10.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: pycparser in /app/python2/2.7.13/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt-common in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-mgmt-network==0.20.1->azure-mgmt==0.20.2->azure->elasticluster==1.3.dev0)
Requirement already up-to-date: wrapt>=1.7.0 in /app/python2/2.7.13/lib/python2.7/site-packages (from debtcollector>=1.2.0->oslo.utils>=3.18.0->python-novaclient->elasticluster==1.3.dev0)
Requirement already up-to-date: azure-mgmt-nspkg in /app/python2/2.7.13/lib/python2.7/site-packages (from azure-mgmt-common->azure-mgmt-network==0.20.1->azure-mgmt==0.20.2->azure->elasticluster==1.3.dev0)
Building wheels for collected packages: ansible, google-compute-engine
Running setup.py bdist_wheel for ansible ... done
Stored in directory: /root/.cache/pip/wheels/8d/15/f8/97e6e96f6bb5a5aa0193e2c9ebc86a9fc6ce7be42b1732d05b
Running setup.py bdist_wheel for google-compute-engine ... done
Stored in directory: /root/.cache/pip/wheels/ba/0d/3a/853913bc8f6a31c7c5a4242c7e5e9a452b4fb990a5743b3951
Successfully built ansible google-compute-engine
Installing collected packages: jinja2, setuptools, ansible, google-compute-engine, pytz, elasticluster, Babel, oslo.i18n, oslo.utils, requests, oslo.serialization, cffi
Found existing installation: Jinja2 2.8.1
Uninstalling Jinja2-2.8.1:
Successfully uninstalled Jinja2-2.8.1
Found existing installation: setuptools 34.3.2
Uninstalling setuptools-34.3.2:
Successfully uninstalled setuptools-34.3.2
Found existing installation: ansible 2.2.1.0
Uninstalling ansible-2.2.1.0:
Successfully uninstalled ansible-2.2.1.0
Found existing installation: google-compute-engine 2.3.4
Uninstalling google-compute-engine-2.3.4:
Successfully uninstalled google-compute-engine-2.3.4
Found existing installation: pytz 2016.10
Uninstalling pytz-2016.10:
Successfully uninstalled pytz-2016.10
Found existing installation: elasticluster 1.3.dev0
Uninstalling elasticluster-1.3.dev0:
Successfully uninstalled elasticluster-1.3.dev0
Running setup.py install for elasticluster ... done
Found existing installation: Babel 2.3.4
Uninstalling Babel-2.3.4:
Successfully uninstalled Babel-2.3.4
Found existing installation: oslo.i18n 3.14.0
Uninstalling oslo.i18n-3.14.0:
Successfully uninstalled oslo.i18n-3.14.0
Found existing installation: oslo.utils 3.23.0
Uninstalling oslo.utils-3.23.0:
Successfully uninstalled oslo.utils-3.23.0
Found existing installation: requests 2.10.0
Uninstalling requests-2.10.0:
Successfully uninstalled requests-2.10.0
Found existing installation: oslo.serialization 2.17.0
Uninstalling oslo.serialization-2.17.0:
Successfully uninstalled oslo.serialization-2.17.0
Found existing installation: cffi 1.9.1
Uninstalling cffi-1.9.1:
Successfully uninstalled cffi-1.9.1
Successfully installed Babel-2.4.0 ansible-2.2.2.0 cffi-1.10.0 elasticluster-1.3.dev0 google-compute-engine-2.3.5 jinja2-2.9.5 oslo.i18n-3.15.0 oslo.serialization-2.18.0 oslo.utils-3.24.0 pytz-2017.2 requests-2.13.0 setuptools-34.3.3

@dirkpetersen

This comment has been minimized.

Copy link
Author

dirkpetersen commented Mar 31, 2017

but unfortunately I have the same result:

dirk@rhino1:~$ elasticluster --version
Traceback (most recent call last):
File "/app/python2/2.7.13/bin/elasticluster", line 6, in
from pkg_resources import load_entry_point
File "/app/python2/2.7.13/lib/python2.7/site-packages/pkg_resources/init.py", line 3036, in
@_call_aside
File "/app/python2/2.7.13/lib/python2.7/site-packages/pkg_resources/init.py", line 3020, in _call_aside
f(*args, **kwargs)
File "/app/python2/2.7.13/lib/python2.7/site-packages/pkg_resources/init.py", line 3049, in _initialize_master_workingt
working_set = WorkingSet._build_master()
File "/app/python2/2.7.13/lib/python2.7/site-packages/pkg_resources/init.py", line 656, in _build_master
return cls._build_from_requirements(requires)
File "/app/python2/2.7.13/lib/python2.7/site-packages/pkg_resources/init.py", line 669, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/app/python2/2.7.13/lib/python2.7/site-packages/pkg_resources/init.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.13.0 (/app/python2/2.7.13/lib/python2.7/site-packages), Requirement.par)

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 1, 2017

@dirkpetersen

This comment has been minimized.

Copy link
Author

dirkpetersen commented Apr 1, 2017

No, I also needed to downgrade to requests 2.12.1 when i used virtualenv

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 28, 2017

Just got (by private email) a report that this happens in a virtualenv on a EC2
VM equipped with RHEL 7.3::

(elasticluster)[ec2-user@ip-172-30-0-32 src]$ elasticluster list
Traceback (most recent call last):
  File "/home/ec2-user/elasticluster/bin/elasticluster", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/ec2-user/elasticluster/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3036, in <module>
    @_call_aside
  File "/home/ec2-user/elasticluster/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3020, in _call_aside
    f(*args, **kwargs)
  File "/home/ec2-user/elasticluster/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3049, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/ec2-user/elasticluster/lib/python2.7/site-packages/pkg_resources/__init__.py", line 656, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/home/ec2-user/elasticluster/lib/python2.7/site-packages/pkg_resources/__init__.py", line 669, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/home/ec2-user/elasticluster/lib/python2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.13.0 (/home/ec2-user/elasticluster/lib/python2.7/site-packages), Requirement.parse('requests!=2.12.2,!=2.13.0,>=2.10.0'), set(['keystoneauth1']))
(elasticluster)[ec2-user@ip-172-30-0-32 src]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

As I cannot reproduce this issue on my Ubuntu 16.04, it looks as if this is
OS-dependent behavior?

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 28, 2017

Anyway, running

pip install requests==2.12.3

seems to fix it.

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 28, 2017

I stand corrected, the bug is reproducible on Ubuntu as well -- it's just that it happens when the elasticluster script is called, not during installation.

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 28, 2017

It looks like two distinct libraries depend on requests, but pip install
fails to merge the version requirements and only honors the requirement spec by
python-novaclient::

$ egrep 'Requires-Dist: requests ' /home/rmurri/.virtualenvs/elasticluster-issue-414/local/lib/python2.7/site-packages/*.dist-info/METADATA
.../.virtualenvs/elasticluster-issue-414/local/lib/python2.7/site-packages/keystoneauth1-2.19.0.dist-info/METADATA:Requires-Dist: requests (!=2.13.0,!=2.12.2,>=2.10.0)
.../.virtualenvs/elasticluster-issue-414/local/lib/python2.7/site-packages/python_novaclient-7.1.0.dist-info/METADATA:Requires-Dist: requests (!=2.12.2,>=2.10.0)

I'll report this upstream to pip authors; as a stop-gap measure I'll manually
merge the requirements and add them to ElastiCluster's setup.py.

riccardomurri added a commit that referenced this issue Apr 28, 2017

Manually marge dependent library versions from `python-novaclient` an…
…d `keystoneauth1`

See issue #414 for details.
@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 28, 2017

It looks like this is a long known issue in pip, see pypa/pip#988 (e.g., the comment pypa/pip#988 (comment) ).

The only solution for now is to manually resolve the conflict(s) and add the solution to the top-level requirements list, see comment pypa/pip#988 (comment)

riccardomurri added a commit that referenced this issue Apr 28, 2017

@riccardomurri

This comment has been minimized.

Copy link
Member

riccardomurri commented Apr 28, 2017

I have documented the workaround and noted down the requirement in setup.py so this specific problem with requests version 2.13.0 should not happen again.

It can however happen again any time for a different version of the involved libraries but there is nothing we can do about it -- this is a problem with pip's dependency resolution mechanism and until pip fixes it, Python packages can only react...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment