You run something like:
import opensim as osim works, but Moco fails later complaining about CasADiimport casadi fails with ModuleNotFoundErrorDLL load failed, The specified module could not be found, or missing .dll messagesIn Anaconda Prompt:
conda activate opensim_env
where python
python -c "import sys; print(sys.executable)"
Expected: the path points inside your environment, for example:
...\\anaconda3\\envs\\opensim_env\\python.exe or ...\\Users\\<you>\\.conda\\envs\\opensim_env\\python.exe
If it points to base, Windows Store Python, or some other Python, you are not in the right interpreter.
With opensim_env activated:
conda list casadi
python -c "import casadi; print(casadi.__version__)"
If conda list casadi shows nothing or the import fails, install it:
conda install -c conda-forge casadi
Then test again: