Closed RasmusOrsoe closed 2 years ago
The code seems to be run using a python 2.7 interpreter. This is due to the use of the OscNext icetray environment. See issue #9 for a resolution.
For completeness and posterity, here is the proposed resolution: https://github.com/icecube/gnn-reco/issues/9#issuecomment-926469557
Changed cvmfs to
$ eval `/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/setup.sh`
$ /cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/RHEL_7_x86_64/metaprojects/combo/stable/env-shell.sh
Error:
(base) [pcs557@hep02 gnn-reco]$ python setup.py develop --user
Collecting torch>=1.9.0
Downloading https://files.pythonhosted.org/packages/ad/da/a1693073397b30fc3390def5a33cbe630f1b9446ea296845680af95080af/torch-1.9.1-cp37-cp37m-manylinux1_x86_64.whl (831.4MB)
|████████████████████████████████| 831.4MB 11kB/s
Collecting typing-extensions
Using cached https://files.pythonhosted.org/packages/74/60/18783336cc7fcdd95dae91d73477830aa53f5d3181ae4fe20491d7fc3199/typing_extensions-3.10.0.2-py3-none-any.whl
Installing collected packages: typing-extensions, torch
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/RHEL_7_x86_64/lib/python3.7/site-packages/typing_extensions.py'
Traceback (most recent call last):
File "setup.py", line 36, in <module>
import torch # pyright: reportMissingImports=false
ModuleNotFoundError: No module named 'torch'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 38, in <module>
install('torch>=1.9.0')
File "setup.py", line 7, in install
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
File "/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/RHEL_7_x86_64/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/RHEL_7_x86_64/bin/python', '-m', 'pip', 'install', 'torch>=1.9.0']' returned non-zero exit status 1.
This is probably due (at least) to the setup script trying to install torch for all users rather than just for the specific user, which is not allowed in the CVMFS environment; thus the ERROR: Could not install packages due to an EnvironmentError: 8...)
error. See PR #36 for a possible resolution and/or check locally by adding the --user
option in the install method at the top of the setup.py
file.
python setup.py develop --user
fails when run inside cvmfs. This is an issue of high priority because it means that the icetray dependent code inside gnnreco cannot be run!cvmfs details: setup.sh : /cvmfs/icecube.opensciencegrid.org/py3-v4/setup.sh (python 2.7) env-shell.sh : /cvmfs/icecube.opensciencegrid.org/users/Oscillation/software/oscNext_meta/releases/latest/build/env-shell.sh
code to reproduce error: load cvmfs:
Once inside cvmfs,
cd
to repository and runpython setup.py develop --user
Error: