You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in PyG community, people find sometimes it's quite difficult to install torch-geometric with pip. For example, if torch isn't installed in advance, installing torch-geometric together with its dependency torch-scatter or torch-sparse will report errors like ModuleNotFoundError: No module named 'torch'. This is because torch-scatter and torch-sparse need torch for compiling during installation. So torch has to be installed in advance. This is also why I removed torch-geometric from pypots basic dependencies but added it to optional ones.
I would suggest our development team and our users use Conda for environment building and management that can avoid this issue. In case one may have to install pypots with pip, please run the code below, which is copied from the workflow PyPOTS/.github/workflows/testing_daily.yml:
export PYTORCH_VERSION="1.13.1"# entering the root dir of PyPOTS projectcd PyPOTS
# install torch first
pip install torch==$PYTORCH_VERSION -f https://download.pytorch.org/whl/torch_stable.html
# get install torch version, it could be "1.13.1+cpu" (CPU version) and "1.13.1+cu117" (CUDA version), or '1.13.1+rocm5.2'.export VER="$(python -c 'import torch;print(torch.__version__)')"# we need to do some filtering here to determine torch-geometric CUDA or CPU version should be installedexport INSTALLED_TORCH_VERSION="$(if [ `echo $VER| grep 'cu'` ] || [ `echo $VER| grep 'cpu'` ];thenecho$VER;elseecho${{ matrix.torch-version }}+cpu; fi)"echo"Installed version of torch is $INSTALLED_TORCH_VERSION"
pip install -e ".[optional]" -f "https://data.pyg.org/whl/torch-$INSTALLED_TORCH_VERSION.html"
pip install -e ".[basic,test]"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As discussed in PyG community, people find sometimes it's quite difficult to install torch-geometric with pip. For example, if torch isn't installed in advance, installing torch-geometric together with its dependency torch-scatter or torch-sparse will report errors like
ModuleNotFoundError: No module named 'torch'
. This is because torch-scatter and torch-sparse need torch for compiling during installation. So torch has to be installed in advance. This is also why I removed torch-geometric from pypots basic dependencies but added it to optional ones.I would suggest our development team and our users use Conda for environment building and management that can avoid this issue. In case one may have to install pypots with pip, please run the code below, which is copied from the workflow PyPOTS/.github/workflows/testing_daily.yml:
Beta Was this translation helpful? Give feedback.
All reactions