question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Won't install on Windows

See original GitHub issue

Hi I have a working installation of CUDA on windows. I tried to pip install in a fresh conda environment and this is the error: `Building wheel for torch (setup.py) … error ERROR: Command errored out with exit status 1: command: ‘C:\Users\Windows.conda\envs\sg2pt\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“‘; file=’”‘“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\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\Windows\AppData\Local\Temp\pip-wheel-qnj_g1p4’ cwd: C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\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\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py”, line 265, in <module> description=“Tensors and Dynamic neural networks in Python with strong GPU acceleration”, File “C:\Users\Windows.conda\envs\sg2pt\lib\site-packages\setuptools_init_.py”, line 145, in setup return distutils.core.setup(**attrs) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\core.py”, line 148, in setup dist.run_commands() File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 966, in run_commands self.run_command(cmd) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 985, in run_command cmd_obj.run() File “C:\Users\Windows.conda\envs\sg2pt\lib\site-packages\wheel\bdist_wheel.py”, line 223, in run self.run_command(‘build’) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\cmd.py”, line 313, in run_command self.distribution.run_command(command) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 985, in run_command cmd_obj.run() File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\command\build.py”, line 135, in run self.run_command(cmd_name) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\cmd.py”, line 313, in run_command self.distribution.run_command(command) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 985, in run_command cmd_obj.run() File “C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\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 Running setup.py clean for torch ERROR: Command errored out with exit status 1: command: ‘C:\Users\Windows.conda\envs\sg2pt\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“‘; file=’”‘“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“';f=getattr(tokenize, '”‘“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ clean --all cwd: C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch Complete output (2 lines): running clean error: [Errno 2] No such file or directory: ‘.gitignore’

ERROR: Failed cleaning build dir for torch Building wheel for torch-optimizer (setup.py) … done Created wheel for torch-optimizer: filename=torch_optimizer-0.0.1a3-py3-none-any.whl size=27775 sha256=51d63835d9fc64c5405d1f78d9e80833dfee80060c47c02efb5f3a0184ba251f Stored in directory: c:\users\windows\appdata\local\pip\cache\wheels\5a\8d\dd\ef34a7144ff43ca2c8ae6d58c147d760e77732c71702d63d17 Successfully built stylegan2-pytorch fire torch-optimizer Failed to build torch ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but you’ll have torch 0.1.2.post2 which is incompatible. ERROR: torch-optimizer 0.0.1a3 has requirement torch>=1.1.0, but you’ll have torch 0.1.2.post2 which is incompatible. Installing collected packages: six, termcolor, fire, numpy, tqdm, pyyaml, torch, pillow, torchvision, torch-optimizer, stylegan2-pytorch Running setup.py install for torch … error ERROR: Command errored out with exit status 1: command: ‘C:\Users\Windows.conda\envs\sg2pt\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“‘; file=’”‘“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“';f=getattr(tokenize, '”‘“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ install --record ‘C:\Users\Windows\AppData\Local\Temp\pip-record-hsissqb0\install-record.txt’ --single-version-externally-managed --compile --install-headers ‘C:\Users\Windows.conda\envs\sg2pt\Include\torch’ cwd: C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch
Complete output (23 lines): running install running build_deps Traceback (most recent call last): File “<string>”, line 1, in <module> File “C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py”, line 265, in <module> description=“Tensors and Dynamic neural networks in Python with strong GPU acceleration”, File “C:\Users\Windows.conda\envs\sg2pt\lib\site-packages\setuptools_init_.py”, line 145, in setup return distutils.core.setup(**attrs) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\core.py”, line 148, in setup dist.run_commands() File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 966, in run_commands self.run_command(cmd) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 985, in run_command cmd_obj.run() File “C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py”, line 99, in run self.run_command(‘build_deps’) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\cmd.py”, line 313, in run_command self.distribution.run_command(command) File “C:\Users\Windows.conda\envs\sg2pt\lib\distutils\dist.py”, line 985, in run_command cmd_obj.run() File “C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py”, line 51, in run from tools.nnwrap import generate_wrappers as generate_nn_wrappers ModuleNotFoundError: No module named ‘tools.nnwrap’ ---------------------------------------- ERROR: Command errored out with exit status 1: ‘C:\Users\Windows.conda\envs\sg2pt\python.exe’ -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“‘; file=’”‘“‘C:\Users\Windows\AppData\Local\Temp\pip-install-z52d0319\torch\setup.py’”’“';f=getattr(tokenize, '”‘“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ install --record ‘C:\Users\Windows\AppData\Local\Temp\pip-record-hsissqb0\install-record.txt’ --single-version-externally-managed --compile --install-headers ‘C:\Users\Windows.conda\envs\sg2pt\Include\torch’ Check the logs for full command output.`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lucidrainscommented, Feb 13, 2020
1reaction
rhoencommented, Feb 12, 2020

I’ve been trying to get this working on windows too and I was seeing the same error as you. I was able to solve it by installing pytorch and torchvision directly before installing stylegan2_pytorch with conda install pytorch torchvision -c python. After that runs conda install stylegan2_pytorch again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get help with Windows upgrade and installation errors
Make sure that your device has enough space. · Run Windows Update a few times. · Check third-party drivers and download any updates....
Read more >
8 Ways to Fix Windows 10 if It Won't Install on Your PC
1. Fix Driver errors · 2. Keep your PC on and try installing again · 3. Turn off VPN software and increase the...
Read more >
Why Won't Windows 10 Install From a USB? Causes and Fixes
How to fix Windows 10 not installing from a USB · Use a different installation method · Use a different USB drive ·...
Read more >
[SOLVED] Windows 10 Could Not Complete the Installation + ...
Case 2: Windows 10 Installation Has Failed · Fix 1. Check Whether Your Computer Meets the Minimum Requirements · Fix 2. Clear Certain...
Read more >
12 irritating Windows 10 installation issues, and how to fix them
Hold the Shift key down while you click Start, Power, Restart. · Once you are in the Windows Recovery Environment, select Troubleshoot, then ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found