extra-index-url that works with pip does not work with pipenv install
See original GitHub issueIssue description
Pytorch nightly can be installed using this pip command:
pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html
I am unable to install the same package using pipenv install.
I added this source entry in my Pipfile
[[source]]
name = "pytorch-nightly"
url = "https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html"
verify_ssl = true
and added torch-nightly under packages like this:
[packages]
torch-nightly = {version="*", index="pytorch-nightly"}
Expected result
Installation of torch-nightly from pytorch’s index
Actual result
ERROR: ERROR: Could not find a version that matches torch-nightly
Steps to replicate
Add the above [[source]] and [packages] entries in your Pipfile and run pipenv install
$ pipenv --support
Pipenv version: '2018.11.15.dev0'
Pipenv location: '/usr/lib/python3.7/site-packages/pipenv'
Python location: '/usr/bin/python'
Python installations found:
3.7.3:/usr/bin/python33.7.3:/usr/bin/python3.7m3.7.2:/home/kureta/.pyenv/versions/dimensions-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/exif-move-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/DRIT-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/tf-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/wgan-gp-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/zachary-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/stylegan-venv/bin/python3.7.2:/home/kureta/.pyenv/versions/3.7.2/bin/python3.7.2:/home/kureta/.pyenv/versions/3.7.2/bin/python3.7m2.7.16:/usr/bin/python2
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.7.3',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.19.31-rt18-4-rt-bfq',
'platform_system': 'Linux',
'platform_version': '#1 SMP PREEMPT RT Sat Apr 13 17:52:33 +03 2019',
'python_full_version': '3.7.3',
'python_version': '3.7',
'sys_platform': 'linux'}
System environment variables:
SHELLDESKTOP_SESSIONGTK_MODULESXDG_SEATPWDLOGNAMEQT_QPA_PLATFORMTHEMEXDG_SESSION_TYPEDSSI_PATHXAUTHORITYHOMELANGVST_PATHXDG_CURRENT_DESKTOPINVOCATION_IDXDG_SESSION_CLASSUSERDISPLAYSHLVLXDG_VTNRXDG_SESSION_IDXDG_RUNTIME_DIRMAVEN_OPTSJOURNAL_STREAMPATHDBUS_SESSION_BUS_ADDRESSLV2_PATHMAILLADSPA_PATHCADENCE_AUTO_STARTED_KITTY_WINDOW_IDWINDOWIDTERMCOLORTERMTERMINFOOLDPWDZSHGEM_HOMEEDITORALTERNATE_EDITORPAGERLESSLSCOLORSLS_COLORSPYENV_SHELLLC_CTYPEPIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH:/home/kureta/.pyenv/shims:/home/kureta/.gem/ruby/2.6.0/bin:/home/kureta/.local/bin:/home/kureta/.gem/ruby/2.6.0/bin:/home/kureta/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/kureta/.pyenv/binSHELL:/usr/bin/zshEDITOR:vimLANG:en_US.UTF-8PWD:/home/kureta/Documents/repos/berlin
Contents of Pipfile (‘/home/kureta/Documents/repos/berlin/Pipfile’):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[[source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html"
verify_ssl = true
[dev-packages]
[packages]
numpy = "*"
opencv-python = "*"
essentia = "*"
jack-client = "*"
torch-nightly = {version="*", index="pytorch"}
torchvision-nightly = "*"
[requires]
python_version = "3.7"
[pipenv]
allow_prereleases = true
Contents of Pipfile.lock (‘/home/kureta/Documents/repos/berlin/Pipfile.lock’):
{
"_meta": {
"hash": {
"sha256": "463d71343037600bdf8b22cda39a97f0e9cc6cd9cd9bf65dc299658435997b81"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
},
{
"name": "pytorch",
"url": "https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)

Top Related StackOverflow Question
@kureta I emphasized in my last comment that
[source]section works like--index-urlnot--find-links, so it is normal that adding a non-index link to source won’t work.To make the Pipfile itself reproducible, you can specify the dependency with
fileurl like this:Is this possible?
@ajrcampbell just go to https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html and view source code. Download the latest
.whlfrom the list and add it to yourPipfilelike thisOr add this environment variable:
and add torch-nightly to your Pipfile
However, torch is a very large package and, for me, it took a lot of time to lock and/or install anything while I had torch-nightly in my Pipfile, so I downloaded the latest wheel and added it as a local file to like so:
It still took a long time to lock and I finally moved on to venv and pip.