question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install torch-geometric via requirement.txt

See original GitHub issue

The example requirement.txt is as below:

torch==1.3.1
torch-scatter==1.4.0
torch-sparse==0.4.3
torch-cluster==1.4.5
torch-geometric==1.3.2

Cannot successfully install the above packages via pip install -r requirement.txt

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting torch==1.3.1 (from -r requirement.txt (line 1)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/34/2107f342d4493b7107a600ee16005b2870b5a0a5a165bdf5c5e7168a16a6/torch-1.3.1-cp37-cp37m-manylinux1_x86_64.whl (734.6MB) |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 734.6MB 71kB/s Collecting torch-scatter==1.4.0 (from -r requirement.txt (line 4)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b8/c3/8bad887ffa55c86f120ef5ae252dc0e357b3bd956d9fbf45242bacc46290/torch_scatter-1.4.0.tar.gz ERROR: Command errored out with exit status 1: command: /home/minglu1/anaconda3/bin/python -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/tmp/pip-install-8nqd722w/torch-scatter/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/tmp/pip-install-8nqd722w/torch-scatter/setup.pyβ€™β€œ'β€β€˜;f=getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file);code=f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜exec’”’"β€˜))’ egg_info --egg-base pip-egg-info cwd: /tmp/pip-install-8nqd722w/torch-scatter/ Complete output (5 lines): Traceback (most recent call last): File β€œ<string>”, line 1, in <module> File β€œ/tmp/pip-install-8nqd722w/torch-scatter/setup.py”, line 3, in <module> import torch ModuleNotFoundError: No module named β€˜torch’ ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Is this an expected behavior?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
rusty1scommented, Mar 4, 2022

requirements.txt should work just fine when making use of our wheels, e.g.:

-f https://download.pytorch.org/whl/cpu/torch_stable.html
-f https://data.pyg.org/whl/torch-1.10.0+cu113.html
torch==1.10.0+cu113
torch-scatter
torch-sparse
torch-geometric
3reactions
rusty1scommented, Dec 17, 2019

That is absolutely correct. While the installation of torch-geometric does not require the installation of these packages, you can not install both torch and torch-scatter via a single pip command. This is a current limitation, sorry 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot install torch-geometric via requirement.txt #861 - GitHub
Please install torch first then install torch-scatter , torch-cluster and torch-sparse .
Read more >
Installation β€” pytorch_geometric documentation
Installation via Pip Wheels Β· Ensure that at least PyTorch 1.12.0 is installed: Β· Find the CUDA version PyTorch was installed...
Read more >
torch geometric error: FileNotFound: Could not find module ...
I solved my problem with this error. I simply had an old version of Torch and installed torch-scatter and torch-sparse pointing to a...
Read more >
could not find a version that satisfies the requirement torch ...
Bug. When trying to install locally by running pip install -r requirements.txt the following error can occur depending on the CUDA version installed:....
Read more >
cortexlabs/cortex - Gitter
I'm trying to install torch geometric in a custom docker image ... install --no-cache-dir -r /src/cortex/serve/requirements.txt # Install PyTorch Geometric.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found