When I try to import the RapidCodePython I get the following error: “importError: DLL load failed while importing _RapidCodePython: The specified module could not be found”
I’m using python 3.3.2
It seems python can’t find the RapidCode64.dll dependency.
What should I do so python can find this .dll?
I placed these files in the “python/Lib/site-packages” folders.
RapidCodePython.py
_RapidCodePython.pyd
RapidCode64.dll
but did not work.
Here are some of the most common causes of the DLL failing to load:
Incompatible version of Python or NumPy: Try upgrading to Python 3.10 and ensure that NumPy 1.22 is installed
INtime DLL’s are missing from the search path: If you are on Windows, then some of the INtime libraries are needed to load RapidCode. You can try adding the following snippet before you attempt to import RapidCode:
import os
os.add_dll_directory("c:\\Program Files (x86)\\INtime\\bin")
RMP packages are missing from Python module search path: This is unlikely to be the cause in your case, since you placed the RapidCode files directly in your site-packages, but it may be worth trying. You can add the following snippet after step 2, but before importing RapidCode:
import sys
# replace 10.X.X with your installed version
sys.path.append("C:\\RSI\\10.X.X")
If these solve your issue, then you can eliminate the code snippet from #3 by creating a file called rsi.pth in your site-packages folder with the following contents (replace 10.X.X with your installed version):
Is there any way you could distribute the Swig interface file you use so that customers could build the module for whatever Python version they wanted to use?
We use several interface files and a custom-compiled post-processor executable that would make it difficult for us to distribute. We’re aware and also frustrated by the Python version support. We will continue to look for solutions that would enable more version support. Let us know if you have any ideas!