Seems I have found the problem. The actual python dll was loaded from C:\Windows\System32 which is searched before PATH. Seemingly, the way to fix this is to put the python27.dll to the application folder (they are searched there before system folders).

Thoughts?

Rostislav.

On 30/09/2015 16:55, Rostislav Khlebnikov wrote:
Hi guys,

I am having a problem that python's Lib\lib-dynload libraries are not found when executing code from Mitk's python plugin.
For example, if I execute "import socket" an error occurs:

Traceback (most recent call last):

File "<string>", line 1, in <module>

File "P:\MITK_python\sb\ep\lib\python2.7\lib\socket.py", line 47, in <module>

import _socket

ImportError: No module named _socket


I can get around this by manually adding the "...\Lib\lib-dynload" folder to "sys.path". This, however, is highly strange because when I run the interpreter directly from "ep\lib\python2.7\bin", import socket works smoothly.

Can anyone explain this difference? What should I do to allow the lib-dynloadwork correctly?


There are more differences in a followup e-mail about matplotlib.


Rostislav.



------------------------------------------------------------------------------


_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to