pipenv找不到可用版本

2024-10-03 13:21:47 发布

您现在位置:Python中文网/ 问答频道 /正文

警告:我是python和pipenv的新手

我正在尝试使用shakedownpipenv创建一个可复制的DC/OS测试设置。我认为下面的问题更像是一个pipenv的问题。在

我第一次安装:

pipenv install dcoscli

如果我这样做,我可以看到:

...
dcoscli (0.5.7)
...

然后,我尝试安装dcos-shakedown,它抱怨找不到{}

^{pr2}$

尽管出现错误消息,dcos-shakedown似乎已安装并正在工作。在

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)

安装失败后,我的pip文件如下所示:

[[source]]

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


[dev-packages]



[packages]

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


[requires]

python_version = "3.6"

我也尝试显式地安装pipenv install dcoscli==0.5.7,但是我得到了与上面相同的错误消息。在

我确实在两个依赖项的virtualenv(pipenv shell)中尝试了一个“普通”pip install),但它没有给我带来任何问题。(为了避免污染,我确实在试验之间清理了virtualenv目录)

我是做错什么了还是遇到了一些问题?在


Tags: installpippypi消息警告virtualenvpackagespipenv
1条回答
网友
1楼 · 发布于 2024-10-03 13:21:47

所以这对我来说很好。如果我在MacOS或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)!

现在看起来您的pipenv可能是从一个已有来源的venv或{a2}运行的

我会从香草壳开始。或者检查shell上的PATH变量是否指向系统上的“不同”python二进制文件

相关问题 更多 >