Install p4python on Maya 2022

Hi! Does anyone ever have problem installing p4python on maya 2022? Which use python3? I don’t have any problem installing p4python when I use maya 2019, which use python 2.7. But after I upgraded to maya 2022, I can’t get the p4python working. I tried to use mayapy to install p4python with pip, but it’s giving me error message. Here is the couple wording I tried:

pip install p4python
-m pip install p4python
mayapy -m pip install p4python
-m pip3 install p4python

I always get this error message:

File “stdin”, line 1

An alternative way I tried is to install p4python in my window cmd using pip install p4python (which is a success), then I copy the entire package to the maya python folder. When I tried to import P4, it said it’s missing the module:

Error: ModuleNotFoundError: file C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\ line 410: No module named ‘P4API’ #coding

I’ve tried so many way but still can’t get p4python running in maya 2022, I hope somebody can shed me some light here. Thanks!!

Oh sorry - just read the title…
We use the standard 37 p4python without issue so you likely have installed the wrong version somehow.
Delete your p4python, either with pip or manually and try again?
Might be an issue that pip is using a cached p4python that is incompatible so look to see what the console says during install?
If you look in the p4python folder the compiled P4API.pyd file should have the py version in its name.

Yes, that’s exactly the problem. Just figure my current python version is 3.10. After I downgrade to 3.7 then it’s working. Thank you!!