Skip to content
Permalink
Browse files

update installation instructions

  • Loading branch information
rusty1s committed Feb 14, 2020
1 parent 2b761f3 commit 68e91478c3ec200156620e9eb9b40aabfece7e61
Showing with 12 additions and 11 deletions.
  1. +3 −3 README.md
  2. +8 −8 docs/source/notes/installation.rst
  3. +1 −0 torch_geometric/nn/pool/__init__.py
@@ -115,20 +115,20 @@ We are motivated to constantly make PyTorch Geometric even better.
## Installation
Ensure that at least PyTorch 1.4.0 is installed, *e.g.*:
Ensure that PyTorch 1.4.0 is installed, *e.g.*:
```
$ python -c "import torch; print(torch.__version__)"
>>> 1.4.0
```
Then run:
Then run
```sh
$ pip install torch-scatter==latest+${CUDA} torch-sparse==latest+${CUDA} -f https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.4.0.html
$ pip install torch-cluster (optional)
$ pip install torch-spline-conv (optional)
$ pip install torch-geometric
$ python setup.py install or pip install torch-geometric
```
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu100` or `cu101` depending on your PyTorch installation.
@@ -2,15 +2,15 @@ Installation
============

We have outsourced a lot of functionality of PyTorch Geometric to other packages, which needs to be installed in advance.
These packages come with their own CPU and GPU kernel implementations based on the newly introduced `C++/CUDA extensions <https://github.com/pytorch/extension-cpp/>`_ in PyTorch 0.4.0.
These packages come with their own CPU and GPU kernel implementations based on `C++/CUDA extensions <https://github.com/pytorch/extension-cpp/>`_ introduced in PyTorch 0.4.0.

.. note::
We do not recommend installation as root user on your system python.
Please setup an `Anaconda/Miniconda <https://conda.io/docs/user-guide/install/index.html/>`_ environment or create a `Docker image <https://www.docker.com/>`_.

Please follow the steps below for a successful installation:

#. Ensure that at least PyTorch 1.4.0 is installed:
#. Ensure that PyTorch 1.4.0 is installed:

.. code-block:: none

@@ -67,15 +67,15 @@ Please follow the steps below for a successful installation:
$ nvcc --version
>>> 10.0
#. Install all needed packages:
#. Install all needed packages with ``${CUDA}`` replaced by either ``cpu``, ``cu92``, ``cu100`` or ``cu101`` depending on your PyTorch installation:

.. code-block:: none

$ pip install --verbose --no-cache-dir torch-scatter
$ pip install --verbose --no-cache-dir torch-sparse
$ pip install --verbose --no-cache-dir torch-cluster
$ pip install --verbose --no-cache-dir torch-spline-conv (optional)
$ pip install torch-geometric
$ pip install torch-scatter==latest+${CUDA} torch-sparse==latest+${CUDA} -f https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.4.0.html
$ pip install torch-cluster (optional)
$ pip install torch-spline-conv (optional)
$ python setup.py install or pip install torch-geometric


In rare cases, CUDA or Python path problems can prevent a successful installation.
``pip`` may even signal a successful installation, but runtime errors complain about missing modules, *.e.g.*, ``No module named 'torch_*.*_cuda'``, or execution simply crashes with ``Segmentation fault (core dumped)``.
@@ -68,6 +68,7 @@ def knn(x, y, k, batch_x=None, batch_y=None, cosine=False):
:rtype: :class:`LongTensor`
.. code-block:: python
import torch
from torch_geometric.nn import knn

0 comments on commit 68e9147

Please sign in to comment.
You can’t perform that action at this time.