当我在Pipfile中为包设置一个特定版本并使用pipenv install时,就会安装特定的版本。但是,当我使用pipenv install --dev和其中一个dev包时,需要第一个包(无论版本),我指定的版本号不受尊重。
举个例子也许是最好的:
$ pipenv --version
pipenv, version 9.0.3
$ pipenv --python 3
Creating a virtualenv for this project…
Using /usr/bin/python3 to create virtualenv…
⠋Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/daniel/.local/share/virtualenvs/scratch-kl-E6MqG/bin/python3
Also creating executable in /home/daniel/.local/share/virtualenvs/scratch-kl-E6MqG/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/daniel/.local/share/virtualenvs/scratch-kl-E6MqG
$ pipenv shell
$ pip freeze
$ pipenv install
Installing dependencies from Pipfile.lock (53ac0c)…
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 00:00:02
$ pip freeze
Django==1.11.9
pytz==2017.3
$ pipenv install --dev
Installing dependencies from Pipfile.lock (53ac0c)…
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:04
$ pip freeze
Django==2.0.1
django-debug-toolbar==1.9.1
pytz==2017.3
sqlparse==0.2.4
$ cat Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "<2.0,>=1.11"
[dev-packages]
django-debug-toolbar = "*"需要注意的是,django-debug-toolbar上的需求是>=1.11,因此不需要升级Django包,然而,这正是正在发生的事情。
这是个窃听器还是我做错了什么?
发布于 2018-01-25 11:32:01
原来这是一个错误 (现在修好了),所以如果其他人碰到这个,现在您知道在哪里查找:-)
https://stackoverflow.com/questions/48439913
复制相似问题