jiupinjia / stylized-neural-painting

Official Pytorch implementation of the preprint paper "Stylized Neural Painting", in CVPR 2021.
https://jiupinjia.github.io/neuralpainter/
Creative Commons Zero v1.0 Universal
1.56k stars 261 forks source link

Error running demo script #11

Closed 20ben closed 3 years ago

20ben commented 3 years ago

So when I tried to run the demo script from the github code, I got an error saying no module named torch. I tried installing torch using the command pip install torch, but got ERROR: Command errored out with exit status 1.

Error for running Demo Script: python demo_prog.py --img_path ./test_images/images.jpg --canvas_color 'white' --max_m_strokes 500 --max_divide 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush --net_G zou-fusion-net Traceback (most recent call last): File "C:\Users\20ben\stylized-neural-painting\demo_prog.py", line 3, in <module> import torch ModuleNotFoundError: No module named 'torch'

Error for installing torch: `ERROR: Command errored out with exit status 1: command: 'c:\users\20ben\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\torch\setup.py'"'"'; file='"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\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\Public\Documents\Wondershare\CreatorTemp\pip-record-eydivo47\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\20ben\python\Include\torch' cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\torch\ Complete output (23 lines): running install running build_deps Traceback (most recent call last): File "", line 1, in File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\torch\setup.py", line 225, in setup(name="torch", version="0.1.2.post2", File "c:\users\20ben\python\lib\site-packages\setuptools__init__.py", line 165, in setup return distutils.core.setup(**attrs) File "c:\users\20ben\python\lib\distutils\core.py", line 148, in setup dist.run_commands() File "c:\users\20ben\python\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "c:\users\20ben\python\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\torch\setup.py", line 99, in run self.run_command('build_deps') File "c:\users\20ben\python\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\users\20ben\python\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\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\20ben\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\torch\setup.py'"'"'; file='"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-d_ot0_7g\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\Public\Documents\Wondershare\CreatorTemp\pip-record-eydivo47\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\20ben\python\Include\torch' Check the logs for full command output.`

rezicG commented 3 years ago

To install the torch dependencies you need to use the installation commands found here: https://pytorch.org/

20ben commented 3 years ago

ok thank you!