c# - Embded Python Import Ctypes fails -


i'm using python .net using python 2.7, copied needed directories python2.7 application directory when try import ctypes, in interactive shell

import ctypes 

the error

traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "c:\tesetpynet\bin\debug\lib\ctypes\__init__.py", line 10, in <module>     _ctypes import union, structure, array importerror: dll load failed: specified module not found. 

what i'm asking there away set path dll folder.

note: when embeded python 3.4.3 c# app , copied directories of python run-time app directory, worked fine importing ctypes, on os no installed versions of python

after digging , inspection, _ctypes.pyd nothing os specific (dynamic link library'for windows'-shared object 'for unix like')

so when inspected dependencies,unlike python27.dll depeneds on msvcr100.dll.it depends on msvcr90.dll

so solution copy msvcr90.dll working directory of application or dlls directory, beside _ctypes.pyd


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -