1
I am trying to work with python zincbase and need to install pytorch on windows for that. When executing
pip install torch
I get an error saying
ERROR: Command errored out with exit status 1:
command: 'c:\data-nobackup\development\im-099329-
gremlintest\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\104172\\AppData\\Local\\Temp\\pip-install-5go0i_r_\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\104172\\AppData\\Local\\Temp\\pip-install-5go0i_r_\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\104172\AppData\Local\Temp\pip-wheel-bk0m_2ck' --python-tag cp36
cwd: C:\Users\104172\AppData\Local\Temp\pip-install-5go0i_r_\torch\
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\104172\AppData\Local\Temp\pip-install-5go0i_r_\torch\setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "c:\data-nobackup\development\im-099329-gremlintest\env\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\customsoftware\python3.6\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\customsoftware\python3.6\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\customsoftware\python3.6\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\data-nobackup\development\im-099329-gremlintest\env\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "c:\customsoftware\python3.6\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\customsoftware\python3.6\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\customsoftware\python3.6\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\customsoftware\python3.6\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\customsoftware\python3.6\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\104172\AppData\Local\Temp\pip-install-5go0i_r_\torch\setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
ERROR: Failed building wheel for torch
How can I install pytorch?
You won't be able to install PyTorch on windows via
pip
, as there are no prebuilt packages on PyPI for windows (and the one source distpip
finds is way too outdated). You should use Anaconda on Windows and install from PyTorch official channel. – hoefling – 2019-08-19T11:25:47.377