How to compile p4python for Maya 2018?

Hello everyone,
Recently, I’m working on a project working with Perforce and I want to do some perforce operations inside Maya by python.
As we known, the python2.7 of Maya 2018 build by vs2015 , so I need to re-compile the p4python by vs2015.
I know that perforce have offered a plugin for Maya 2018 named P4GT, but it seems that I can’t run perforce command through it.
Here is the compile errors screen shot when I compile the perforce 2017.1. I download all source file from [https://cdist2.perforce.com/perforce/r17.1/bin.ntx64/](http://p4python references) and [https://pypi.org/project/p4python/2017.1.1526044/#files](http://p4python source)
And go through the compile progress from this website:https://www.perforce.com/perforce/doc.current/user/p4pythonnotes.txt


Can anyone help me?
Thank you very much.
Yixiong Xu
2021.03.18

Can’t help you with recompiling I’m afraid, but this version of P4Python was compiled for MSC v.1900 (and works with Maya 2019). As far as I remember both 2018 and 2019 were built with VS2015 so this should work for you.

https://drive.google.com/file/d/1d8J_jQOs7M7XDu46c0a1GijfFwcJw2w1/view?usp=sharing

2 Likes

Hi ross-g,
Thank you for your reply.
It helps me a lot.
BTW, the compiling progress is really interesting even though it has many tough things.
Yours,
Yixiong Xu
2021.03.19