Skip to content

Installation from source fails #112

Open
@ojeda-e

Description

@ojeda-e

When running pip install requirements.txt I get:

pip install -r requirements.txt
Collecting torch>=1.8.0
  Downloading torch-1.12.0-cp39-cp39-manylinux1_x86_64.whl (776.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 776.3/776.3 MB 1.8 MB/s eta 0:00:00
Collecting torch-scatter>=2.0.8
  Using cached torch_scatter-2.0.9.tar.gz (21 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-0i9b31jh/torch-scatter_41398618c2884ce58012da70cf290897/setup.py", line 8, in <module>
          import torch
      ModuleNotFoundError: No module named 'torch'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

OS specs

OS: Linux pop-os x86_64 GNU/Linux
Python version: 3.8, 3.9, 3.10 (I tried all of them)

Possible solution

Since installation of RDKIT is recommended via conda, I was wondering if is possible to modify requirements.txt to make it a requirements.yaml, with a section for conda and pip, then it is possible to create a conda environment together with the pip dependencies needed. Then, instead of pip install requirements.txt, one could do:

conda env create -f requirements.yaml

Maybe it's possible to have two files, one that works for Python 3.10, and another that works for Python = [3.7, 3.8, 3.9] (based on the version of torch).

Edit: typos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions