Anaconda cannot find package dependencies, cmd python can

Viewed 12

I am trying to import a python module from a certain folder. This is the code:

import sys
sys.path.append(r"C:\path\to\module_foobar")
import foobar

In a miniconda env with all prerequisites installed (python 3.10 and numpy), I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing foobar: The specified procedure could not be found.

But with the system python in cmd, the same code works.

Tried adding the path to system path variable as well as specifying it in a custom .pth file in the site-packages folder of the miniconda environment.

Tried running dependencywalker on the .pyd file of the package and it says that a bunch of MS C++ Redistributeable dll files seem to be missing. Tried repairing those to no avail.

What on earth could be wrong?

0 Answers
Related