Question

I have two 64 bit Windows 7 machines with Python 2.7.6 installed. I copied the library CharPyLS (jpeg_ls) into the site-packages of both Python27 directories. One machine works fine, the other complains that it can't find the charPyLS DLL.

Things I have tried:
- Used md5 to verify that the copies are the same
- Checked that the system paths are the same
- Checked that machines are running Python 2.7.6
- Copying entire Python27 directory to both machines

Is there anything external to the files in the Python27 directory that could be affecting this?

Edit: The module was built on a third machine before copying to these two. One works so it can't have anything to do with Windows registry.

Edit2: Running Dependency Walker solved the problem. The PC that built CharPyLS has MinGW so the module was built assuming libgcc_s_dw2-1.dll and libstdc++-6.dll exist. Copying these two files to Python27/DLLs solved the problem.

Was it helpful?

Solution

Adding:

extra_link_args = ['-static', '-static-libstdc++']

to the CharPyLS setup.py (around line 21) should roll these two dll's into the _CharLS.pyd when you build it with:

python setup.py build
python setup.py install
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top