Search code examples
pythonpipdcospipenv

pipenv cannot find available version


Warning: I'm new to python and pipenv

I'm trying to create a reproducible DC/OS test setup using shakedown with pipenv. I think what follows is more of a pipenv issue.

I first installed:

pipenv install dcoscli

and if I do pipenv shell & pip list I can see:

...
dcoscli (0.5.7)
...

Then, I attempt to install dcos-shakedown and it complains that it cannot find dcoscli==0.5.7

pipenv install dcos-shakedown
CRITICAL:pip.index:Could not find a version that satisfies the requirement dcoscli==0.5.7 (from versions: 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.10, 0.4.11, 0.4.12, 0.4.13, 0.4.14)
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies

Despite of the error message, dcos-shakedown seems to be installed and working.

pipenv shell
python
------
Python 3.6.3 (default, Oct  3 2017, 21:45:48) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from shakedown import *
(succeeds)

My Pipfile after the failed install looks like this:

[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[dev-packages]



[packages]

dcoscli = "*"
dcos-shakedown = "*"
behave = "*"


[requires]

python_version = "3.6"

I also tried to explicitly install pipenv install dcoscli==0.5.7 but I get the same error message as above.

I did try a "plain" pip install within the virtualenv (pipenv shell) of both dependencies and it doesn't give me any issues. (I did clean up the virtualenv directory between trials to avoid polution)

Am I doing something wrong or am I facing some bug?


Solution

  • So this runs fine for me. If I start from scratch on MacOS or Ubuntu

    $ pipenv install dcoscli
    Creating a virtualenv for this project…
    ⠋Using real prefix '/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6'
    New python executable in /Users/username/.local/share/virtualenvs/username-T-RxC1Pn/bin/python3.6
    Also creating executable in /Users/username/.local/share/virtualenvs/username-T-RxC1Pn/bin/python
    Installing setuptools, pip, wheel...done.
    
    Virtualenv location: /Users/username/.local/share/virtualenvs/username-T-RxC1Pn
    Installing dcoscli…
    Collecting dcoscli
      Using cached dcoscli-0.5.7-py3-none-any.whl
    Collecting pkginfo==1.2.1 (from dcoscli)
    Collecting cryptography==2.0.2 (from dcoscli)
      Using cached cryptography-2.0.2-cp36-cp36m-macosx_10_6_intel.whl
    Collecting sseclient==0.0.14 (from dcoscli)
    Collecting virtualenv<16.0,>=13.0 (from dcoscli)
      Using cached virtualenv-15.1.0-py2.py3-none-any.whl
    Collecting retrying==1.3.3 (from dcoscli)
    Collecting toml<1.0,>=0.9 (from dcoscli)
    Collecting dcos==0.5.7 (from dcoscli)
      Using cached dcos-0.5.7-py3-none-any.whl
    Collecting docopt<1.0,>=0.6 (from dcoscli)
    Collecting six>=1.4.1 (from cryptography==2.0.2->dcoscli)
      Using cached six-1.11.0-py2.py3-none-any.whl
    Collecting asn1crypto>=0.21.0 (from cryptography==2.0.2->dcoscli)
      Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
    Collecting cffi>=1.7 (from cryptography==2.0.2->dcoscli)
      Using cached cffi-1.11.2-cp36-cp36m-macosx_10_6_intel.whl
    Collecting idna>=2.1 (from cryptography==2.0.2->dcoscli)
      Using cached idna-2.6-py2.py3-none-any.whl
    Collecting requests>=2.0.0 (from sseclient==0.0.14->dcoscli)
      Using cached requests-2.18.4-py2.py3-none-any.whl
    Collecting pygments<3.0,>=2.0 (from dcos==0.5.7->dcoscli)
      Using cached Pygments-2.2.0-py2.py3-none-any.whl
    Collecting pager<4.0,>=3.3 (from dcos==0.5.7->dcoscli)
    Collecting jsonschema<3.0,>=2.5 (from dcos==0.5.7->dcoscli)
      Using cached jsonschema-2.6.0-py2.py3-none-any.whl
    Collecting PyJWT==1.4.2 (from dcos==0.5.7->dcoscli)
      Using cached PyJWT-1.4.2-py2.py3-none-any.whl
    Collecting prettytable<1.0,>=0.7 (from dcos==0.5.7->dcoscli)
    Collecting pycparser (from cffi>=1.7->cryptography==2.0.2->dcoscli)
    Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.0.0->sseclient==0.0.14->dcoscli)
      Using cached chardet-3.0.4-py2.py3-none-any.whl
    Collecting certifi>=2017.4.17 (from requests>=2.0.0->sseclient==0.0.14->dcoscli)
      Using cached certifi-2017.11.5-py2.py3-none-any.whl
    Collecting urllib3<1.23,>=1.21.1 (from requests>=2.0.0->sseclient==0.0.14->dcoscli)
      Using cached urllib3-1.22-py2.py3-none-any.whl
    Installing collected packages: pkginfo, six, asn1crypto, pycparser, cffi, idna, cryptography, chardet, certifi, urllib3, requests, sseclient, virtualenv, retrying, toml, pygments, pager, jsonschema, PyJWT, prettytable, dcos, docopt, dcoscli
    Successfully installed PyJWT-1.4.2 asn1crypto-0.24.0 certifi-2017.11.5 cffi-1.11.2 chardet-3.0.4 cryptography-2.0.2 dcos-0.5.7 dcoscli-0.5.7 docopt-0.6.2 idna-2.6 jsonschema-2.6.0 pager-3.3 pkginfo-1.2.1 prettytable-0.7.2 pycparser-2.18 pygments-2.2.0 requests-2.18.4 retrying-1.3.3 six-1.11.0 sseclient-0.0.14 toml-0.9.4 urllib3-1.22 virtualenv-15.1.0
    
    Adding dcoscli to Pipfile's [packages]…
    Locking [dev-packages] dependencies…
    Locking [packages] dependencies…
    Updated Pipfile.lock (120443)!
    
    $ pipenv install dcos-shakedown
    Installing dcos-shakedown…
    Collecting dcos-shakedown
    Requirement already satisfied: dcoscli==0.5.7 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos-shakedown)
    Collecting scp (from dcos-shakedown)
      Using cached scp-0.10.2-py2.py3-none-any.whl
    Collecting pytest-timeout (from dcos-shakedown)
      Using cached pytest_timeout-1.2.1-py2.py3-none-any.whl
    Collecting click (from dcos-shakedown)
      Using cached click-6.7-py2.py3-none-any.whl
    Requirement already satisfied: retrying in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos-shakedown)
    Collecting pytest (from dcos-shakedown)
      Using cached pytest-3.3.2-py2.py3-none-any.whl
    Collecting paramiko (from dcos-shakedown)
      Using cached paramiko-2.4.0-py2.py3-none-any.whl
    Requirement already satisfied: sseclient==0.0.14 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: toml<1.0,>=0.9 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: docopt<1.0,>=0.6 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: dcos==0.5.7 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: pkginfo==1.2.1 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: cryptography==2.0.2 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: virtualenv<16.0,>=13.0 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: six>=1.7.0 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from retrying->dcos-shakedown)
    Collecting py>=1.5.0 (from pytest->dcos-shakedown)
      Using cached py-1.5.2-py2.py3-none-any.whl
    Collecting attrs>=17.2.0 (from pytest->dcos-shakedown)
      Using cached attrs-17.4.0-py2.py3-none-any.whl
    Requirement already satisfied: setuptools in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from pytest->dcos-shakedown)
    Collecting pluggy<0.7,>=0.5 (from pytest->dcos-shakedown)
    Collecting pynacl>=1.0.1 (from paramiko->dcos-shakedown)
      Using cached PyNaCl-1.2.1-cp36-cp36m-macosx_10_6_intel.whl
    Collecting pyasn1>=0.1.7 (from paramiko->dcos-shakedown)
      Using cached pyasn1-0.4.2-py2.py3-none-any.whl
    Collecting bcrypt>=3.1.3 (from paramiko->dcos-shakedown)
      Using cached bcrypt-3.1.4-cp36-cp36m-macosx_10_6_intel.whl
    Requirement already satisfied: requests>=2.0.0 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from sseclient==0.0.14->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: pager<4.0,>=3.3 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos==0.5.7->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: PyJWT==1.4.2 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos==0.5.7->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: pygments<3.0,>=2.0 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos==0.5.7->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: jsonschema<3.0,>=2.5 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos==0.5.7->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: prettytable<1.0,>=0.7 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from dcos==0.5.7->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: idna>=2.1 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from cryptography==2.0.2->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: cffi>=1.7 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from cryptography==2.0.2->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: asn1crypto>=0.21.0 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from cryptography==2.0.2->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from requests>=2.0.0->sseclient==0.0.14->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from requests>=2.0.0->sseclient==0.0.14->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: certifi>=2017.4.17 in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from requests>=2.0.0->sseclient==0.0.14->dcoscli==0.5.7->dcos-shakedown)
    Requirement already satisfied: pycparser in ./.local/share/virtualenvs/username-T-RxC1Pn/lib/python3.6/site-packages (from cffi>=1.7->cryptography==2.0.2->dcoscli==0.5.7->dcos-shakedown)
    Installing collected packages: pynacl, pyasn1, bcrypt, paramiko, scp, py, attrs, pluggy, pytest, pytest-timeout, click, dcos-shakedown
    Successfully installed attrs-17.4.0 bcrypt-3.1.4 click-6.7 dcos-shakedown-1.4.12 paramiko-2.4.0 pluggy-0.6.0 py-1.5.2 pyasn1-0.4.2 pynacl-1.2.1 pytest-3.3.2 pytest-timeout-1.2.1 scp-0.10.2
    
    Adding dcos-shakedown to Pipfile's [packages]…
    Locking [dev-packages] dependencies…
    Locking [packages] dependencies…
    Updated Pipfile.lock (120443)!
    

    Now looks like your might be running pipenv from an already sourced venv or https://virtualenv.pypa.io/en/stable/

    I would start from vanilla shell. Or check that the PATH variable on your shell doesn't make it point to a 'different' python binary on your system