Pipenv and pip compatible HTML indices
See original GitHub issueI’m trying to install pytorch with a specific version of CUDA into my pipenv managed virtualenv.
I’ve found that running
pipenv run pip install torch==1.4.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html
does work but obviously this is not perfect since the package goes into the virtualenv without updating the Pipfile.
I also found a stackoverflow post that seems to pose the same question - I tried reproducing their setup and ran into the same issue.
Is this functionality something that can be reproduced in pipenv or is it something that I’d need to open a feature request for?
Many thanks!
Pipenv version: '2018.11.26'
Pipenv location: '/usr/local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/local/bin/python3.6'
Python installations found:
3.6.9
:/home/james/.local/share/virtualenvs/james-S7OvSt0E/bin/python
3.6.9
:/usr/local/bin/python3.6
3.6.9
:/usr/local/bin/python3.6m
3.5.2
:/usr/bin/python3.5m
3.5.2
:/usr/bin/python3
2.7.12
:/usr/bin/python2
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.9',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.15.0-74-generic',
'platform_system': 'Linux',
'platform_version': '#83~16.04.1-Ubuntu SMP Wed Dec 18 04:56:23 UTC 2019',
'python_full_version': '3.6.9',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
XDG_SEAT_PATH
XDG_CONFIG_DIRS
LANG
DISPLAY
SHLVL
LOGNAME
XDG_VTNR
MANDATORY_PATH
LANGUAGE
USER
XAUTHORITY
QT_LINUX_ACCESSIBILITY_ALWAYS_ON
QT_QPA_PLATFORMTHEME
XDG_GREETER_DATA_DIR
XDG_SESSION_ID
PWD
DESKTOP_SESSION
CINNAMON_VERSION
XDG_SESSION_DESKTOP
GDMSESSION
GNOME_DESKTOP_SESSION_ID
DEFAULTS_PATH
DBUS_SESSION_BUS_ADDRESS
VTE_VERSION
GTK_OVERLAY_SCROLLING
GJS_DEBUG_TOPICS
XDG_DATA_DIRS
QT_STYLE_OVERRIDE
QT_ACCESSIBILITY
GDM_LANG
SHELL
XDG_SESSION_TYPE
GJS_DEBUG_OUTPUT
TERM
SESSION_MANAGER
WINDOWID
SSH_AUTH_SOCK
GTK_MODULES
XDG_CURRENT_DESKTOP
PATH
HOME
XDG_SEAT
XDG_RUNTIME_DIR
XDG_SESSION_PATH
GPG_AGENT_INFO
OLDPWD
PAGER
LESS
LC_CTYPE
LSCOLORS
LS_COLORS
VIRTUAL_ENV_DISABLE_PROMPT
LD_LIBRARY_PATH
PERL5LIB
PERL_LOCAL_LIB_ROOT
PERL_MB_OPT
PERL_MM_OPT
SPARK_HOME
NVM_DIR
NVM_CD_FLAGS
NVM_BIN
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PIPENV_ACTIVE
VIRTUAL_ENV
CORENLP_HOME
PIP_SHIMS_BASE_MODULE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Debug–specific environment variables:
PATH
:/home/james/.local/share/virtualenvs/james-S7OvSt0E/bin:/home/james/.cargo/bin:/home/james/perl5/bin:/home/james/.nvm/versions/node/v8.0.0/bin:/home/james/.cargo/bin:/home/james/perl5/bin:/home/james/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/james/todo.txt_cli:/usr/local/go/bin:/home/james/go/bin:/home/james/todo.txt_cli:/usr/local/go/bin:/home/james/go/bin:/usr/local/cuda/bin/
SHELL
:/bin/zsh
LANG
:en_GB.UTF-8
PWD
:/home/james/workspace/banditsum-kl
VIRTUAL_ENV
:/home/james/.local/share/virtualenvs/james-S7OvSt0E
Contents of Pipfile
(‘/home/james/workspace/banditsum-kl/Pipfile’):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[[source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/torch_stable.html"
verify_ssl = false
[dev-packages]
[packages]
pyrouge = "*"
tqdm = "*"
stanford-corenlp = "*"
numpy = "*"
torch = {index = "pytorch",version = "==1.4.0%2Bcu100"}
[requires]
python_version = "3.6"
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:5 (2 by maintainers)
The problem seems to lie in the structure of the pytorch website. I propose a solution in the already linked stackoverflow thread: https://stackoverflow.com/questions/59752559/how-to-specify-pytorch-cuda-version-in-pipenv
@frostming With Pipenv version
2020.8.13
the above does not work. (I suppose you meanthttps://download.pytorch.org/whl/torch_stable.html
for the URL.)Pipfile
Also not working with
torch
version==1.4.0+cu100
(like in the original question)Output of
pipenv lock --clear
The issue doesn’t seem to be fixed.