gcorso / DiffDock

Implementation of DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking
https://arxiv.org/abs/2210.01776
MIT License
1.11k stars 265 forks source link

error install openfold #87

Closed ydzdfci closed 1 year ago

ydzdfci commented 1 year ago

I got error message when "pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307'" Here is the error message: pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307' Collecting openfold@ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307 Cloning https://github.com/aqlaboratory/openfold.git (to revision 4b41059694619831a7db195b7e0988fc4ff3a307) to /tmp/pip-install-2idkfo_h/openfold_54ae9c7ec3b04e44bd05f274ee69b53a Running command git clone --quiet https://github.com/aqlaboratory/openfold.git /tmp/pip-install-2idkfo_h/openfold_54ae9c7ec3b04e44bd05f274ee69b53a 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 ╰─> [166 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-38 creating build/lib.linux-x86_64-cpython-38/openfold copying openfold/init.py -> build/lib.linux-x86_64-cpython-38/openfold copying openfold/config.py -> build/lib.linux-x86_64-cpython-38/openfold creating build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/init.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/errors.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/input_pipeline.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/mmcif_parsing.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/parsers.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/data_modules.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/data_pipeline.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/data_transforms.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/feature_pipeline.py -> build/lib.linux-x86_64-cpython-38/openfold/data copying openfold/data/templates.py -> build/lib.linux-x86_64-cpython-38/openfold/data creating build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/dropout.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/embedders.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/model.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/msa.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/pair_transition.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/torchscript.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/triangular_attention.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/init.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/evoformer.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/heads.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/outer_product_mean.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/primitives.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/structure_module.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/template.py -> build/lib.linux-x86_64-cpython-38/openfold/model copying openfold/model/triangular_multiplicative_update.py -> build/lib.linux-x86_64-cpython-38/openfold/model creating build/lib.linux-x86_64-cpython-38/openfold/np copying openfold/np/protein.py -> build/lib.linux-x86_64-cpython-38/openfold/np copying openfold/np/residue_constants.py -> build/lib.linux-x86_64-cpython-38/openfold/np copying openfold/np/init.py -> build/lib.linux-x86_64-cpython-38/openfold/np creating build/lib.linux-x86_64-cpython-38/openfold/resources copying openfold/resources/init.py -> build/lib.linux-x86_64-cpython-38/openfold/resources creating build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/argparse.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/callbacks.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/checkpointing.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/chunk_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/exponential_moving_average.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/feats.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/import_weights.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/logger.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/lr_schedulers.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/rigid_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/seed.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/superimposition.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/suppress_output.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/tensor_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/trace_utils.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/validation_metrics.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/init.py -> build/lib.linux-x86_64-cpython-38/openfold/utils copying openfold/utils/loss.py -> build/lib.linux-x86_64-cpython-38/openfold/utils creating build/lib.linux-x86_64-cpython-38/openfold/data/tools copying openfold/data/tools/init.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools copying openfold/data/tools/hhblits.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools copying openfold/data/tools/hhsearch.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools copying openfold/data/tools/jackhmmer.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools copying openfold/data/tools/kalign.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools copying openfold/data/tools/utils.py -> build/lib.linux-x86_64-cpython-38/openfold/data/tools creating build/lib.linux-x86_64-cpython-38/openfold/np/relax copying openfold/np/relax/amber_minimize.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax copying openfold/np/relax/cleanup.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax copying openfold/np/relax/relax.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax copying openfold/np/relax/utils.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax copying openfold/np/relax/init.py -> build/lib.linux-x86_64-cpython-38/openfold/np/relax creating build/lib.linux-x86_64-cpython-38/openfold/utils/kernel copying openfold/utils/kernel/init.py -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel copying openfold/utils/kernel/attention_core.py -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel 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' /anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'openfold.utils.kernel.csrc' as data is deprecated, please list it in packages. !!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'openfold.utils.kernel.csrc' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.

      'openfold.utils.kernel.csrc' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).

      Please make sure that 'openfold.utils.kernel.csrc' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" and "data files" on setuptools
      documentation page.

  !!

    check.warn(importable)
  creating build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
  copying openfold/utils/kernel/csrc/compat.h -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
  copying openfold/utils/kernel/csrc/softmax_cuda.cpp -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
  copying openfold/utils/kernel/csrc/softmax_cuda_kernel.cu -> build/lib.linux-x86_64-cpython-38/openfold/utils/kernel/csrc
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-2idkfo_h/openfold_54ae9c7ec3b04e44bd05f274ee69b53a/setup.py", line 74, in <module>
      setup(
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
      super().run_command(command)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
      super().run_command(command)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
      super().run_command(command)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
      _build_ext.run(self)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 485, in build_extensions
      compiler_name, compiler_version = self._check_abi()
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 869, in _check_abi
      _, version = get_compiler_abi_compatibility_and_version(compiler)
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 336, in get_compiler_abi_compatibility_and_version
      if not check_compiler_ok_for_platform(compiler):
    File "/anaconda3/envs/diffdock/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 290, in check_compiler_ok_for_platform
      which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
    File "/anaconda3/envs/diffdock/lib/python3.8/subprocess.py", line 415, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/anaconda3/envs/diffdock/lib/python3.8/subprocess.py", line 516, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['which', 'g++']' returned non-zero 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

jjv5 commented 1 year ago

We are getting this error also. What was the resolution? IS that exact commit required or can one install openfold outside of diffdock?

ydzdfci commented 1 year ago

We are getting this error also. What was the resolution? IS that exact commit required or can one install openfold outside of diffdock?

Please check if you installed g++. For me I successfully installed openfold after administrator installed g++ and enabled on the machine.

jjv5 commented 1 year ago

This was the issue for me also. I can now install. Thanks very much.