Pytorch_geometric: How to install newest torch_geometric with conda environment?

Created on 12 Apr 2020  路  3Comments  路  Source: rusty1s/pytorch_geometric

馃摎 Installation

Environment

  • OS:
  • Python version:
  • PyTorch version:
  • CUDA/cuDNN version:
  • GCC version:
  • How did you try to install PyTorch Geometric and its extensions (pip, source):
  • Any other relevant information:

Checklist

  • [ ] I followed the installation guide.
  • [ ] I cannot find my error message in the FAQ.
  • [ ] I set up CUDA correctly and can compile CUDA code via nvcc.
  • [ ] I have cloned the repository and tried a manual installation from source.
  • [ ] I do have multiple CUDA versions on my machine.
  • [ ] I checked if the official extension example runs on my machine.
  • [ ] The offical extension example runs on my machine.

Additional context

Most helpful comment

conda activate base
mkdir pygeo
cd pygeo
git clone --recursive https://github.com/rusty1s/pytorch_geometric.git
git clone --recursive https://github.com/rusty1s/pytorch_cluster.git
git clone --recursive https://github.com/rusty1s/pytorch_scatter.git
git clone --recursive https://github.com/rusty1s/pytorch_spline_conv.git
git clone --recursive https://github.com/rusty1s/pytorch_sparse.git
python ./pytorch_sparse/setup.py develop
python ./pytorch_spline_conv/setup.py develop
python ./pytorch_scatter/setup.py develop
python ./pytorch_cluster/setup.py develop
python ./pytorch_geometric/setup.py develop

I believe there are is also a dependency called METIS, but it is optional. If you need to satisfy conda dependencies, I usually just write a stub meta.yaml in an empty folder with build.sh also doing nothing.

Also to note, due to CUDA you need GCC 8.4 or below. I've tested it to be working with torch 1.4.0 and torch 1.5.0dev (latest master branch)

All 3 comments

conda activate base
mkdir pygeo
cd pygeo
git clone --recursive https://github.com/rusty1s/pytorch_geometric.git
git clone --recursive https://github.com/rusty1s/pytorch_cluster.git
git clone --recursive https://github.com/rusty1s/pytorch_scatter.git
git clone --recursive https://github.com/rusty1s/pytorch_spline_conv.git
git clone --recursive https://github.com/rusty1s/pytorch_sparse.git
python ./pytorch_sparse/setup.py develop
python ./pytorch_spline_conv/setup.py develop
python ./pytorch_scatter/setup.py develop
python ./pytorch_cluster/setup.py develop
python ./pytorch_geometric/setup.py develop

I believe there are is also a dependency called METIS, but it is optional. If you need to satisfy conda dependencies, I usually just write a stub meta.yaml in an empty folder with build.sh also doing nothing.

Also to note, due to CUDA you need GCC 8.4 or below. I've tested it to be working with torch 1.4.0 and torch 1.5.0dev (latest master branch)

You can also just use the provided wheels for an easier installation.

Thank you for your help!

Was this page helpful?
0 / 5 - 0 ratings