PyTorch installation with pipenv fails (pipenv install torch)
See original GitHub issueInstalling torch fails with error
Trying to install PyTorch on Win10 64bit, Python 3.8.5 64bit, doing either:
pipenv install torch
-> fails
or
pipenv install torch===1.6.0
-> fails
However, pip install torch===1.6.0
works great!
Expected result
Describe what you expected.
Actual result
pipenv install torch===1.6.0 Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. Y ou can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning. Installing torch===1.6.0… Adding torch to Pipfile’s [packages]… Installation Succeeded Pipfile.lock (c14e35) out of date, updating to (023c79)… Locking [dev-packages] dependencies… Locking [packages] dependencies… Building requirements… Resolving dependencies… Locking Failed! CRITICAL:pipenv.patched.notpip._internal.index.package_finder:Could not find a version that satisfies the requirement torch===1.6.0 (from -r C:\AppData\Local \Temp\pipenvh5ftboijrequirements\pipenv-l9xes5ab-constraints.txt (line 2)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) [ResolutionFailure]: File “c:/users/alon/appdata/local/programs/python/python38/lib/site-packages/pipenv/resolver.py”, line 785, in _main [ResolutionFailure]: resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages) [ResolutionFailure]: File “c:/users/alon/appdata/local/programs/python/python38/lib/site-packages/pipenv/resolver.py”, line 746, in resolve_packages [ResolutionFailure]: results, resolver = resolve( [ResolutionFailure]: File “c:/users/alon/appdata/local/programs/python/python38/lib/site-packages/pipenv/resolver.py”, line 728, in resolve [ResolutionFailure]: return resolve_deps( [ResolutionFailure]: File “c:\appdata\local\programs\python\python38\lib\site-packages\pipenv\utils.py”, line 1378, in resolve_deps [ResolutionFailure]: results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps( [ResolutionFailure]: File “c:\appdata\local\programs\python\python38\lib\site-packages\pipenv\utils.py”, line 1093, in actually_resolve_deps [ResolutionFailure]: resolver.resolve() [ResolutionFailure]: File “c:\appdata\local\programs\python\python38\lib\site-packages\pipenv\utils.py”, line 818, in resolve [ResolutionFailure]: raise ResolutionFailure(message=str(e)) [pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies. First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again. Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation. Hint: try $ pipenv lock --pre if it is a pre-release dependency. ERROR: No matching distribution found for torch===1.6.0 (from -r C:\AppData\Local\Temp\pipenvh5ftboijrequirements\pipenv-l9xes5ab-constraints.txt (line 2))
Steps to replicate
run: pipenv install torch===1.6.0
pipenv --support | clip Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. Y ou can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (2 by maintainers)
Top GitHub Comments
Well, it’s less elegant but the way to do it is by going to the url at https://download.pytorch.org/whl/torch_stable.html and manually finding the relevant version for your system (in my case
cu102/torch-1.6.0-cp38-cp38-win_amd64.whl
). Then either running:pipenv install https://download.pytorch.org/whl/cu102/torch-1.6.0-cp38-cp38-win_amd64.whl
Or using the pipfile:Pipenv and pip don’t work the same way. Try this Pipfile