FreyrS / dMaSIF

Other
193 stars 45 forks source link

Python version requirements on ubuntu #20

Open everyday847 opened 2 years ago

everyday847 commented 2 years ago

Hi,

Trying to get an install working on ubuntu. When I

conda create -n dmasif python=3.6.9
conda activate dmasif
pip install -r requirements.txt

I get a complaint:

ERROR: Could not find a version that satisfies the requirement ipython==7.19.0 (from versions: 0.10, 0.10.1, 0.10.2, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.13.2, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 4.0.0b1, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0rc1, 4.1.0rc2, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.2.1, 5.0.0b1, 5.0.0b2, 5.0.0b3, 5.0.0b4, 5.0.0rc1, 5.0.0, 5.1.0, 5.2.0, 5.2.1, 5.2.2, 5.3.0, 5.4.0, 5.4.1, 5.5.0, 5.6.0, 5.7.0, 5.8.0, 5.9.0, 5.10.0, 6.0.0rc1, 6.0.0, 6.1.0, 6.2.0, 6.2.1, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 7.0.0b1, 7.0.0rc1, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.2.0, 7.3.0, 7.4.0, 7.5.0, 7.6.0, 7.6.1, 7.7.0, 7.8.0, 7.9.0, 7.10.0, 7.10.1, 7.10.2, 7.11.0, 7.11.1, 7.12.0, 7.13.0, 7.14.0, 7.15.0, 7.16.0, 7.16.1, 7.16.2, 7.16.3)
ERROR: No matching distribution found for ipython==7.19.0

Fair enough. With

conda create -n dmasif python=3.7.7
conda activate dmasif
pip install -r requirements.txt

I get a new issue -- well, initially pykeops complains that I don't have a numpy version, so I install one, but this is after that has been resolved:

Collecting torch-cluster==1.5.8
  Using cached torch_cluster-1.5.8.tar.gz (38 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/andy/miniconda3/envs/dmasif/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xzwwngxk/torch-cluster_103368352f6d483aaa0cfdcb9667be1e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xzwwngxk/torch-cluster_103368352f6d483aaa0cfdcb9667be1e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-f_nokz7k
         cwd: /tmp/pip-install-xzwwngxk/torch-cluster_103368352f6d483aaa0cfdcb9667be1e/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-xzwwngxk/torch-cluster_103368352f6d483aaa0cfdcb9667be1e/setup.py", line 7, in <module>
        import torch
    ModuleNotFoundError: No module named 'torch'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ff/39/6524367aed276171ba66675b25b368c1522e1d35e17b96ee4ff4025e1d98/torch_cluster-1.5.8.tar.gz#sha256=a0a32f63faac40a026ab1e9da31f6babdb4d937e53be40bd1c91d9b5a286eee6 (from https://pypi.org/simple/torch-cluster/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement torch-cluster==1.5.8 (from versions: 0.1.1, 0.2.3, 0.2.4, 1.0.1, 1.0.3, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3a1, 1.4.3, 1.4.4, 1.4.5, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.6.0)
ERROR: No matching distribution found for torch-cluster==1.5.8

This all is with a totally fresh environment generated from miniconda, so it's not totally clear to me what the issue might be. Do you happen to have an environment.yml or a docker image that could do the trick?

Longer term, I'm also curious about how to reproduce a couple specific studies in the paper -- for example, the model dMaSIF_search_3layer_12A_16dim in the repository, what flags were used to train it? what does it predict? how can I pipe its output layer into an interpretable format? It looks like the scripts for making figures are purely for reproducing the figures given data, not for repeating the same analysis using dMaSIF and a collection of PDBs. I'd love to (for example) have a script + model to produce the electrostatic surface of a PDB, but it's not clear if that's available!

FreyrS commented 2 years ago

Hi Andy,

Sorry the requirements file is not working for you, it can be a bit tricky to get PyG+KeOps to work well together. I'll attach to this message a Dockerfile and a corresponding requirements file that have been working for me lately, please let me know if they work for you as well. You might also be interested in exploring the Colab notebook The dMaSIF_search generates point descriptors for the point clouds such that interacting/complementary surface patches have similar point descriptors. That particular model used the flags: --experiment_name dMaSIF_search_3layer_12A_16dim --batch_size 64 --embedding_layer dMaSIF --search True --emb_dims 16 --device cuda:0 --radius 12.0 --n_layers 3

Dockerfile.txt requirements.txt

yipy0005 commented 2 years ago

Hi,

Is there any chance you could provide the instructions to how was the environment set up on your end? So that perhaps I can try to reproduce on my local machine too? :)

Yew Mun