alignn
alignn copied to clipboard
Python version>=3.9?
when I ran the code --python setup.py develop
It turned out that
Processing scipy-1.11.0rc2.tar.gz
Writing /tmp/easy_install-7tv5fusw/scipy-1.11.0rc2/setup.cfg
Running scipy-1.11.0rc2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7tv5fusw/scipy-1.11.0rc2/egg-dist-tmp-8nqf7m51
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/root/miniconda3/lib/python3.8/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/root/miniconda3/lib/python3.8/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/root/miniconda3/lib/python3.8/site-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-7tv5fusw/scipy-1.11.0rc2/setup.py", line 33, in
it looks like newer versions of scipy require python 3.9 or newer
you might be able to downgrade scipy to a version that will work with 3.8, but I would recommend upgrading your python version to 3.10 if possible. (last I checked PyTorch had some compatibility issues with python 3.11)
I saw that our README specifies python 3.8, so that will need to be updated...
if you're using anaconda, you should change the environment setup to conda create --name alignn python=3.10
also, if you are using CUDA, it's best to manually install the GPU versions of PyTorch and dgl before installing alignn
Assuming you're on linux and you want CUDA 11.8
conda activate alignn
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda install -c dglteam/label/cu118 dgl
then you can do an in-place install of alignn:
git clone https://github.com/usnistgov/alignn && cd alignn
python -m pip install -e .
One more thing that I recently encountered - in some of my code I'm hitting a possible CUDA bug in the latest version of dgl, so you may wish to install an older version (v1.0.2 does not have the aforementioned issue - you can get it with conda install -c dglteam/label/cu118 dgl==1.0.2.cu118
)
If it is possible just downgrade the scipy?
If it is possible just downgrade the scipy?
it's probably possible, unless some other dependency requires a new version of scipy
After I downgrade the scipy it seems to work, but still got some issues:
Engine run is terminating due to exception: use_deterministic_algorithms() got an unexpected keyword argument 'warn_only'
Traceback (most recent call last):
File "/root/miniconda3/bin/train_folder.py", line 7, in
can you share which version of PyTorch you have installed? I was able to make a clean python 3.8 environment with PyTorch 2.0.1 and DGL "1.0.2+cu118", and I had no issues running the train_folder.py
example from the README
Here are the steps I used to set up the environment:
conda create --name alignn38 python=3.8
conda activate alignn38
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda install scipy
conda install -c dglteam/label/cu118 dgl==1.0.2.cu118
git clone https://github.com/usnistgov/alignn && cd alignn
python -m pip install -e .
I still would encourage switching to python 3.10 because the 3.9 and 3.10 releases introduced a bunch of performance increases and much better error message formatting