Hello, I’m trying to install perforce python lib trough pip.
Everything seems ok during installation but importing P4 lib a run into this error
File “C:\Users\user\AppData\Roaming\Python\Python27\site-packages\P4.py”, line 410, in
import P4API
ImportError: DLL load failed: The specified module could not be found.
Seems I’m not the first one run into this problem, any idea on how to solve it?
Hey Elpie!
Autodesk products use a custom Python interpreter that is built with a specific version of Visual Studio. This means that any 3rd party Python module that contains compiled C code that you may want to use must be recompiled from source in the same build environment where the Max (or Maya or Mobu) custom Python interpreter was built. It’s a big mess.
Your best bet is to execute shell commands to the command line p4.exe application.
Thanks, as I have no rush with this and I’m developing a tool in my free time I’ll go with the first solution.
I’ll learn something new for sure.
Thanks both
hi @Munkybutt where did you get the correct c++ api
I’m following this guide https://community.perforce.com/s/article/2630
they refers to a setup.py file that I cannot find anywhere…can you point me to the right direction?
Thanks
Thanks a lot , I 'll try and I’ll keep you update
Why don’t we add this in the techartist github repository? I’m sure many people could benefit
With the same idea we can add maya and mobu version
Have you ever encountered some problem with a lib called libeay64.lib?
Because I’m trying to build my custom P4 version and the compiler is complaining about missing libs
Was worth a shot.
libeay64 is I believe a part of OpenSSL.
Its very likely that the version of OpenSSL I compiled that with is no longer supported, or is potentially conflicting with something that Max ships with.
Actually for the libeay64.lib I was speaking about the p4python compilation
As I have to recompile mine I used a dev install of openssl then I compiled the p4python source
There the compiler start to complaining about the lib
Should compile my version of OpenSSL?
I took it from here https://slproweb.com/products/Win32OpenSSL.html
and I installed this Win64 OpenSSL v1.1.0k
Can you confirm me that I have to compile OpenSSL as well?
thanks
Right p4python links against openssl. You need to have a version of OpenSSL that is compiled with the same compiler that Max 2019 uses (which I honestly don’t know, probably either VS2015 or VS2017), you then need to use that same compiler when building p4python.
Amusingly building p4python is super easy, its OpenSSL that is a pain.