laserkelvin / PySpecTools

Routines for rotational spectroscopy analysis written in Python 3
MIT License
31 stars 5 forks source link

Installation issue: torch #14

Closed cresuchirp closed 2 years ago

cresuchirp commented 4 years ago

Hi,

I am trying to install the latest version of pyspectools on the lab computer (windows 10, anaconda3). I am getting the following error which seems to be related to pytorch. Any help would be appreciated.

Thanks!

cresuchirp

Building wheel for torch (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\UR1\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py'"'"'; file='"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\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\UR1\AppData\Local\Temp\pip-wheel-2lwphgfj' cwd: C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\ Complete output (30 lines): running bdist_wheel running build running build_deps Traceback (most recent call last): File "", line 1, in File "C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py", line 265, in description="Tensors and Dynamic neural networks in Python with strong GPU acceleration", File "C:\Users\UR1\anaconda3\lib\site-packages\setuptools__init__.py", line 144, in setup return distutils.core.setup(**attrs) File "C:\Users\UR1\anaconda3\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\UR1\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 223, in run self.run_command('build') File "C:\Users\UR1\anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\UR1\anaconda3\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "C:\Users\UR1\anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\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\UR1\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py'"'"'; file='"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\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\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch Complete output (2 lines): running clean error: [Errno 2] No such file or directory: '.gitignore'

ERROR: Failed cleaning build dir for torch Successfully built pyspectools Failed to build torch Installing collected packages: torch, pyspectools Running setup.py install for torch ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\UR1\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py'"'"'; file='"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\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\UR1\AppData\Local\Temp\pip-record-rqzp1u8u\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\UR1\anaconda3\Include\torch' cwd: C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\ Complete output (23 lines): running install running build_deps Traceback (most recent call last): File "", line 1, in File "C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py", line 265, in description="Tensors and Dynamic neural networks in Python with strong GPU acceleration", File "C:\Users\UR1\anaconda3\lib\site-packages\setuptools__init__.py", line 144, in setup return distutils.core.setup(**attrs) File "C:\Users\UR1\anaconda3\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py", line 99, in run self.run_command('build_deps') File "C:\Users\UR1\anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\UR1\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\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\UR1\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\torch\setup.py'"'"'; file='"'"'C:\Users\UR1\AppData\Local\Temp\pip-install-nfdl61_7\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\UR1\AppData\Local\Temp\pip-record-rqzp1u8u\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\UR1\anaconda3\Include\torch' Check the logs for full command output.

laserkelvin commented 4 years ago

Thanks for raising this issue!

I've pushed a new update to the repository, including a conda.yml file. This file contains all the required packages and when used by Anaconda Navigator (on Windows) or conda via the command line, conda will make sure all the packages are built and linked correctly for PySpecTools to be installed.

Please try this out, and in the meantime I'll update the installation instructions in the docs.

laserkelvin commented 4 years ago

I've updated the documentation to include instructions on how to install; could you please try these steps and let me know?

laserkelvin commented 4 years ago

Hi @cresuchirp, could you let me know if you're still having trouble?

laserkelvin commented 2 years ago

Closing for inactivity; we can reopen this if the issue persists.