Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing OpenFold #573

Closed
DaRinker opened this issue Jun 15, 2023 · 2 comments
Closed

Error installing OpenFold #573

DaRinker opened this issue Jun 15, 2023 · 2 comments

Comments

@DaRinker
Copy link

DaRinker commented Jun 15, 2023

I'm following the installation instructions (installing all this in a custom conda environment on a shared computing resource)
Everything has gone well up until the OpenFold installation step.

Bug description
After I run the command:
(esm_gpu)$ pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307'
I get the error:


Collecting openfold@ git+https://github.com/aqlaboratory/openfold.git@4b41059694619831a7db195b7e0988fc4ff3a307
  Cloning https://github.com/aqlaboratory/openfold.git (to revision 4b41059694619831a7db195b7e0988fc4ff3a307) to /tmp/pip-install-ijszxkv5/openfold_9c0f532345174527be994f0e05bd4f36
  Running command git clone --quiet https://github.com/aqlaboratory/openfold.git /tmp/pip-install-ijszxkv5/openfold_9c0f532345174527be994f0e05bd4f36
  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) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 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-ijszxkv5/openfold_9c0f532345174527be994f0e05bd4f36/setup.py", line 56, in <module>
          _, bare_metal_major, _ = get_cuda_bare_metal_version(CUDA_HOME)
        File "/tmp/pip-install-ijszxkv5/openfold_9c0f532345174527be994f0e05bd4f36/setup.py", line 40, in get_cuda_bare_metal_version
          raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
      TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
      [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.

Not sure what to do here? Anybody have any suggestions of how to fix?
Thank you

EDIT: Looks like it has to do with my CUDA installation (or lack of one!)
Loading in CUDA fixed the error.

@lm-jkominek
Copy link

Since I also run into this exact issue myself today, I wanted to leave a solution for posterity. If you're using conda/mamba, then you need to install cudatoolkit-dev from the conda-forge channel, because the standard cudatoolkit (listed in the yml file in the repo) is runtime-only and doesn't come with nvcc which is needed here.

@CoditoDTU
Copy link

Hi @DaRinker I am currently trying to install OpenFold in my virtualVM and stumbled upon exactly the same error as you. I wanted to know what did you exactly mean by loading CUDA? I have already installed nvcc and the cudatoolkit-dev @lm-jkominek mentioned but it has not worked UnU].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants