facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.29k stars 644 forks source link

Installation Error - OpenFold #564

Open tamimmurad opened 1 year ago

tamimmurad commented 1 year ago

Dear ESM Team

I have been trying to install ESM fold on a local server. I used the conda environment file and made sure my g++ is between is satisfied (tried with 10, 9 and 8). However, when it comes to last step which is installing OpenFold i am always getting an error regarding 'building a wheel for openfold' . Appreciate your support. Please find below the command I used and the error. Thanks

$ pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307'
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting openfold@ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307 Cloning https://github.com/aqlaboratory/openfold.git (to revision 4b41059694619831a7db195b7e0988fc4ff3a307) to /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8 Running command git clone --filter=blob:none --quiet https://github.com/aqlaboratory/openfold.git /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8 Running command git rev-parse -q --verify 'sha^4b41059694619831a7db195b7e0988fc4ff3a307' Running command git fetch -q https://github.com/aqlaboratory/openfold.git 4b41059694619831a7db195b7e0988fc4ff3a307 Running command git checkout -q 4b41059694619831a7db195b7e0988fc4ff3a307 Resolved https://github.com/aqlaboratory/openfold.git to commit 4b41059694619831a7db195b7e0988fc4ff3a307 Preparing metadata (setup.py) ... done Building wheels for collected packages: openfold Building wheel for openfold (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [111 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openfold copying openfold/config.py -> build/lib.linux-x86_64-3.7/openfold copying openfold/init.py -> build/lib.linux-x86_64-3.7/openfold creating build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/input_pipeline.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/parsers.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/errors.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/data_modules.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/data_transforms.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/init.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/templates.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/mmcif_parsing.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/data_pipeline.py -> build/lib.linux-x86_64-3.7/openfold/data copying openfold/data/feature_pipeline.py -> build/lib.linux-x86_64-3.7/openfold/data creating build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/primitives.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/triangular_multiplicative_update.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/triangular_attention.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/model.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/structure_module.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/init.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/heads.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/pair_transition.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/msa.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/torchscript.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/embedders.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/dropout.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/template.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/evoformer.py -> build/lib.linux-x86_64-3.7/openfold/model copying openfold/model/outer_product_mean.py -> build/lib.linux-x86_64-3.7/openfold/model creating build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/checkpointing.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/logger.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/suppress_output.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/argparse.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/seed.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/lr_schedulers.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/init.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/loss.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/superimposition.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/chunk_utils.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/trace_utils.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/callbacks.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/exponential_moving_average.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/rigid_utils.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/tensor_utils.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/import_weights.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/feats.py -> build/lib.linux-x86_64-3.7/openfold/utils copying openfold/utils/validation_metrics.py -> build/lib.linux-x86_64-3.7/openfold/utils creating build/lib.linux-x86_64-3.7/openfold/resources copying openfold/resources/init.py -> build/lib.linux-x86_64-3.7/openfold/resources creating build/lib.linux-x86_64-3.7/openfold/np copying openfold/np/protein.py -> build/lib.linux-x86_64-3.7/openfold/np copying openfold/np/init.py -> build/lib.linux-x86_64-3.7/openfold/np copying openfold/np/residue_constants.py -> build/lib.linux-x86_64-3.7/openfold/np creating build/lib.linux-x86_64-3.7/openfold/data/tools copying openfold/data/tools/utils.py -> build/lib.linux-x86_64-3.7/openfold/data/tools copying openfold/data/tools/kalign.py -> build/lib.linux-x86_64-3.7/openfold/data/tools copying openfold/data/tools/init.py -> build/lib.linux-x86_64-3.7/openfold/data/tools copying openfold/data/tools/jackhmmer.py -> build/lib.linux-x86_64-3.7/openfold/data/tools copying openfold/data/tools/hhsearch.py -> build/lib.linux-x86_64-3.7/openfold/data/tools copying openfold/data/tools/hhblits.py -> build/lib.linux-x86_64-3.7/openfold/data/tools creating build/lib.linux-x86_64-3.7/openfold/utils/kernel copying openfold/utils/kernel/attention_core.py -> build/lib.linux-x86_64-3.7/openfold/utils/kernel copying openfold/utils/kernel/init.py -> build/lib.linux-x86_64-3.7/openfold/utils/kernel creating build/lib.linux-x86_64-3.7/openfold/np/relax copying openfold/np/relax/utils.py -> build/lib.linux-x86_64-3.7/openfold/np/relax copying openfold/np/relax/amber_minimize.py -> build/lib.linux-x86_64-3.7/openfold/np/relax copying openfold/np/relax/init.py -> build/lib.linux-x86_64-3.7/openfold/np/relax copying openfold/np/relax/relax.py -> build/lib.linux-x86_64-3.7/openfold/np/relax copying openfold/np/relax/cleanup.py -> build/lib.linux-x86_64-3.7/openfold/np/relax running egg_info creating openfold.egg-info writing openfold.egg-info/PKG-INFO writing dependency_links to openfold.egg-info/dependency_links.txt writing top-level names to openfold.egg-info/top_level.txt writing manifest file 'openfold.egg-info/SOURCES.txt' reading manifest file 'openfold.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'openfold.egg-info/SOURCES.txt' creating build/lib.linux-x86_64-3.7/openfold/utils/kernel/csrc copying openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -> build/lib.linux-x86_64-3.7/openfold/utils/kernel/csrc copying openfold/utils/kernel/csrc/softmax_cuda.cpp -> build/lib.linux-x86_64-3.7/openfold/utils/kernel/csrc copying openfold/utils/kernel/csrc/compat.h -> build/lib.linux-x86_64-3.7/openfold/utils/kernel/csrc running build_ext building 'attn_core_inplace_cuda' extension creating /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7 creating /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold creating /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils creating /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel creating /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel/csrc Emitting ninja build file /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/2] c++ -MMD -MF /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel/csrc/softmax_cuda.o.d -pthread -B /home/tamim/anaconda3/envs/esmfold/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/openfold/utils/kernel/csrc/ -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/TH -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/THC -I/home/tamim/anaconda3/envs/esmfold/include -I/home/tamim/anaconda3/envs/esmfold/include/python3.7m -c -c /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/openfold/utils/kernel/csrc/softmax_cuda.cpp -o /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel/csrc/softmax_cuda.o -O3 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=attn_core_inplace_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [2/2] /home/tamim/anaconda3/envs/esmfold/bin/nvcc -I/tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/openfold/utils/kernel/csrc/ -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/TH -I/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/THC -I/home/tamim/anaconda3/envs/esmfold/include -I/home/tamim/anaconda3/envs/esmfold/include/python3.7m -c -c /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -o /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel/csrc/softmax_cuda_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -std=c++14 -maxrregcount=50 -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS --expt-relaxed-constexpr --expt-extended-lambda -gencode arch=compute_61,code=sm_61 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=attn_core_inplace_cuda -D_GLIBCXX_USE_CXX11_ABI=0 /home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign

  /home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign

  g++ -pthread -shared -B /home/tamim/anaconda3/envs/esmfold/compiler_compat -L/home/tamim/anaconda3/envs/esmfold/lib -Wl,-rpath=/home/tamim/anaconda3/envs/esmfold/lib -Wl,--no-as-needed -Wl,--sysroot=/ /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel/csrc/softmax_cuda.o /tmp/pip-install-x562pllf/openfold_13e7d6f8dae142b19ad969f4b09f21d8/build/temp.linux-x86_64-3.7/openfold/utils/kernel/csrc/softmax_cuda_kernel.o -L/home/tamim/anaconda3/envs/esmfold/lib/python3.7/site-packages/torch/lib -L/home/tamim/anaconda3/envs/esmfold/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-3.7/attn_core_inplace_cuda.cpython-37m-x86_64-linux-gnu.so
  /home/tamim/anaconda3/envs/esmfold/compiler_compat/ld: cannot find /lib64/libpthread.so.0: No such file or directory
  /home/tamim/anaconda3/envs/esmfold/compiler_compat/ld: cannot find /usr/lib64/libpthread_nonshared.a: No such file or directory
  collect2: error: ld returned 1 exit status
  error: command 'g++' failed with exit status 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for openfold Running setup.py clean for openfold Failed to build openfold ERROR: Could not build wheels for openfold, which is required to install pyproject.toml-based projects

mdlakic commented 1 year ago

It says right there at the end:

cannot find /lib64/libpthread.so.0: No such file or directory
cannot find /usr/lib64/libpthread_nonshared.a: No such file or directory

It means you are missing a pthread library and need to install it before continuing.

It is a simple matter of going through the whole error message. I know the error output is long, but if I can do it for a complete stranger on the internet, you should be willing to do it to fix your own problem.

tamimmurad commented 1 year ago

@mdlakic thanks for you reply. I have not posted this immediately from the first time I got an error. Errors kept on coming and tried to fix them but every time new issue. I did your suggestion and unfortunately did not work again. I am repeating every thing again and try from scratch.

Amelie-Schreiber commented 1 year ago

I have issues with OpenFold dependencies as well, especially for the protein programming language material. Did you make any progress on this error @tamimmurad?

tamimmurad commented 1 year ago

@Amelie-Schreiber unfortunately not. I gave up for the time being. However, I used the curl command and it was fine for most of the proteins I wanted to fold. However, it has a limitation on the sequence length to be less than 400aa.