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/python3
3.7.3
:/usr/bin/python3.7m
3.7.2
:/home/kureta/.pyenv/versions/dimensions-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/exif-move-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/DRIT-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/tf-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/wgan-gp-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/zachary-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/stylegan-venv/bin/python
3.7.2
:/home/kureta/.pyenv/versions/3.7.2/bin/python
3.7.2
:/home/kureta/.pyenv/versions/3.7.2/bin/python3.7m
2.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:
SHELL
DESKTOP_SESSION
GTK_MODULES
XDG_SEAT
PWD
LOGNAME
QT_QPA_PLATFORMTHEME
XDG_SESSION_TYPE
DSSI_PATH
XAUTHORITY
HOME
LANG
VST_PATH
XDG_CURRENT_DESKTOP
INVOCATION_ID
XDG_SESSION_CLASS
USER
DISPLAY
SHLVL
XDG_VTNR
XDG_SESSION_ID
XDG_RUNTIME_DIR
MAVEN_OPTS
JOURNAL_STREAM
PATH
DBUS_SESSION_BUS_ADDRESS
LV2_PATH
MAIL
LADSPA_PATH
CADENCE_AUTO_STARTED
_
KITTY_WINDOW_ID
WINDOWID
TERM
COLORTERM
TERMINFO
OLDPWD
ZSH
GEM_HOME
EDITOR
ALTERNATE_EDITOR
PAGER
LESS
LSCOLORS
LS_COLORS
PYENV_SHELL
LC_CTYPE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_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/bin
SHELL
:/usr/bin/zsh
EDITOR
:vim
LANG
:en_US.UTF-8
PWD
:/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)
@kureta I emphasized in my last comment that
[source]
section works like--index-url
not--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
file
url 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
.whl
from the list and add it to yourPipfile
like 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.