I want to use Python third-party libraries in component’s PythonScript behavior. But when I tried to install the related library, It didn’t succeed, and return an error.
My installation process is as follows:
First, I installed the 2.7.15 version of Python on Windows.
Secondly, the numpy .whl installation package is downloaded, and the numpy third-party library is successfully installed on windows via “pip install numpy-1.15.4+mkl-cp27-cp27m-win_amd64.whl”;
Finally, copy and paste the numpy folder under C:\Python27\Lib\site-packages\ into the C:\Program Files\Visual Components\Visual Components Premium 4.1\Python\lib\site-packages directory.
Then,when I write the code in the PythonScript behavior of a component,I got an error as below.
I don’t know why this error occur.
Can you help me answer this question?Thanks very much!
Did you already solve this problem? I have the same problem when I import docx library. It always show the DLL load error. My method is same with you. I used pip to install docx and lxml library in my windows system. And then copy docx and lxml folder to VC4.1premium\Python\lib\site-packages. I’m curious why can I use these library in my system, but can’t use in Visual Components?
I guess its not solved. Now its an headache to implement probability, distribution. For weighted average I was able to find a workaround with python>random library. At least I can create faulty parts with some weighted average. Have a look below.