google-deepmind / alphafold3

AlphaFold 3 inference pipeline.
Other
5.14k stars 578 forks source link

ModuleNotFoundError #33

Closed jhnath21 closed 1 week ago

jhnath21 commented 1 week ago

I have performed all the steps in the installation documentation. After completing build of the docker container, upon running the suggested example to test the setup I obtain the following error traceback message:

Traceback (most recent call last): File "/app/alphafold/run_alphafold.py", line 39, in from alphafold3.common import folding_input File "/app/alphafold/alphafold3/common/folding_input.py", line 23, in from alphafold3 import structure File "/app/alphafold/alphafold3/structure/init.py", line 14, in from alphafold3.structure.bioassemblies import BioassemblyData File "/app/alphafold/alphafold3/structure/bioassemblies.py", line 18, in from alphafold3.structure import mmcif File "/app/alphafold/alphafold3/structure/mmcif.py", line 24, in from alphafold3.constants import chemical_components File "/app/alphafold/alphafold3/constants/chemical_components.py", line 20, in from alphafold3.cpp import cif_dict ModuleNotFoundError: No module named 'alphafold3.cpp'

I have also tried to perform the installation locally without the need to use docker, and get the same error when launching run_alphafold.py.

charlesbeattie commented 1 week ago

I think it may be not finding the module and instead finding the local directory /app/alphafold/alphafold3 I'm not sure why that directory is there from the current docker setup.

Can you print out the output of listing the venv site-package?

docker run -it alphafold3 ls /alphafold3_venv/lib/python3.11/site-packages/alphafold3

It should contain a file named cpp.cpython-311-x86_64-linux-gnu.so which is built during the pip install. If that file is present then the run_alphafold.py is finding the directory /app/alphafold/alphafold3 instead of the one installed in the venv.

Can you remove folder alphafold3 from /app/alphafold/ in your docker image?

Augustin-Zidek commented 1 week ago

Closing this issue now as there haven't been any further comments. Feel free to comment or open a new issue if you are still encountering this problem.

Augustin-Zidek commented 5 days ago

We actually found out that this was caused by an incompatibility with Python 3.12. This has now been fixed in https://github.com/google-deepmind/alphafold3/commit/23e3d46d4ca126e8731e8c0cbb5673e9a848ceb5.