3DFlex Dependencies; CUDA 11.8


Just to clarify the setup for 3DFlex.

Is CUDA 11.8 a prerequisite and should CRYOSPARC_CUDA_PATH now point to it in order to run 3DFlex refinement?

The installation instructions suggest to remove CUDA directories from PATH. Similarly, does LD_LIBRARY_PATH require any special treatment prior to running install-3dflex? I assume it should reference a CUDA 11.8 installation?


Hi @leetleyang,

No, it is not, when you run cryosparcw install-3dflex, CUDA-11.7* is installed in the cryosparc_worker directory via conda.

It does, thank you for the suggestion. We’ve updated the docs to reflect this:

Since CUDA 11.7* is installed via the above command, you do not need these variables to hold a reference to a CUDA directory.


I removed LD_LIBRARY_PATH with


and then removed cuda from PATH with:

export PATH=${PATH/'/usr/local/cuda-8.0/bin'/}

3D-Flex installation still failed (in another thread). I have a question though, Should that affect other programs or cryosparc performance other than 3d-flex?


well it does:

Traceback (most recent call last):
  File "cryosparc_master/cryosparc_compute/run.py", line 80, in cryosparc_compute.run.main
  File "/home/spuser/cryosparc/cryosparc_worker/cryosparc_compute/jobs/jobregister.py", line 443, in get_run_function
    runmod = importlib.import_module(".."+modname, __name__)
  File "/home/spuser/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1050, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "cryosparc_master/cryosparc_compute/jobs/refine/newrun.py", line 16, in init cryosparc_compute.jobs.refine.newrun
  File "/home/spuser/cryosparc/cryosparc_worker/cryosparc_compute/engine/__init__.py", line 8, in <module>
    from .engine import *  # noqa
  File "cryosparc_master/cryosparc_compute/engine/engine.py", line 9, in init cryosparc_compute.engine.engine
  File "cryosparc_master/cryosparc_compute/engine/cuda_core.py", line 4, in init cryosparc_compute.engine.cuda_core
ModuleNotFoundError: No module named 'pycuda'

will that solve it ?

cd cryosparc_worker
./bin/cryosparcw forcdeps

and do i need to set LD_LIBRARY_PATH as well as add CUDA to path again before i can get the cryosparc instance working?


Hi @Bassem,

Yes, you can use ./bin/cryosparcw forcedeps to bring your worker back to it’s original state. You shouldn’t need to add CUDA to your PATH again.

Hi @stephan ,

That worked only if I re-set LD_LIBRARY_PATH again after ./bin/cryosparcw/forcedeps.

before setting it, jobs terminate abnormally within few seconds in browser.

Thank you.

1 Like

Same issue/solution here. Had to re-set path for it to work again.

As I undestand it, the PATH and LD_LIBRARY_PATH customisation is only necessary for the installation of the 3DFlex dependencies, not for general operation once it’s setup. I assume the environment should be properly managed by conda. Although that point is also somewhat moot until the team deals with the installation problem many are currently experiencing.

Also, rather than a complete unset, there are other ways of removing a specific location from the environment variables for a given shell.

For instance:

LD_LIBRARY_PATH=$(echo "$LD_LIBRARY_PATH" | sed -e 's,/path/to/lib/,,')


We have just released CryoSPARC v4.1.1 to address this issue.