Maya 2024 python issue (macOS)

Epicurian6
Contributor
Contributor

Maya 2024 python issue (macOS)

Epicurian6
Contributor
Contributor

After installing latest  python3 with pip for pymel which works great in Maya 2023 I now get an error in Maya 2024 on macos:

 

# Error: line 1: OSError: file /Applications/Autodesk/maya2024/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pymel/internal/parsers.py line 790: Cannot find maya documentation. Expected to find it at /Applications/Autodesk/maya2024/docs/Maya2024/en_US

 

Im unable to run python. This is a total showstopper. What can be done to fix this?

0 Likes
Reply
Accepted solutions (2)
5,942 Views
18 Replies
Replies (18)

nelsoncruz
Autodesk
Autodesk

looks like Pymel is the issue here.  We are looking at this on our end to see if a quick solution can be found.  If you need to run Maya you can remove pymel
mayapy.exe -m pip uninstall pymel



Nelson Cruz
Manager, Software QA Engineering
Installation & Licensing forums | Contact product support | Autodesk AREA


nelsoncruz
Autodesk
Autodesk

Quick solution here is to generate the already made pymel cache files from the previous versions

if you go into your /Applications/Autodesk/maya2024/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pymel/cache

you can duplicate and rename the the files for 2024.
ie mayaCmdsList2022.py --> mayaCmdsList2024.py

 

Looks like it has worked for a few other user sin the community.

 



Nelson Cruz
Manager, Software QA Engineering
Installation & Licensing forums | Contact product support | Autodesk AREA


pablo.valladares.r
Contributor
Contributor

I was try to do this solution and nothing happened the error its in another python file:

/Applications/Autodesk/maya2024/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pymel/internal/parsers.py

I was try to replace the parsers file from 2023 in 2024 version and nothing
also try install from terminal the pymel new version and nothing.

paulgaitanos
Explorer
Explorer

I'm getting the same problem from everyone else I've spoken to who is trying out Maya 2024. mGear is entirely written with pyMel, so if that's unable to install then I'm not sure what to do for our pipeline.

Epicurian6
Contributor
Contributor

I tried copying the cache files over already and it doesn’t work for me 😕

0 Likes

paulgaitanos
Explorer
Explorer
Accepted solution

I spoke with some other people. Until I can get ahold of someone from Luma pictures and ask.

in your pymel Cache folder copy and rename

mayaApi2022 (or 2023)
mayaCmdsDocs2022
mayaCmdsExamples2022
mayaCmdsList2022

let me know if that works for you!

pablo.valladares.r
Contributor
Contributor
Accepted solution

1. Open this path

/Applications/Autodesk/maya2024/Maya.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymel/cache
2. duplicate this files
mayaApi2023
mayaCmdsDocs2023
mayaCmdsExamples2023
mayaCmdsList2023 
3.Rename the duplicates
mayaApi2024
mayaCmdsDocs2024
mayaCmdsExamples2024
mayaCmdsList2024
4. Open Maya and write a code to test.
from pymel.core import *
pm.polyCube()

Working perfect

Epicurian6
Contributor
Contributor

The solution works! Thanks 🙏 

0 Likes

Mike_Isaakidis
Advocate
Advocate

I cannot find the path to this

/Applications/Autodesk/maya2024/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pymel/cache

How do find this path? (Im on a Windows PC)

Ah found it here:
\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\pymel\cache

Did not work for me

0 Likes

warnold1
Autodesk
Autodesk

if you used mayapy to install pymel, the pip show command should show where it is installed

 

mayapy -m pip show pymel 


Wayne Arnold

Developer

pablo.valladares.r
Contributor
Contributor

Here there are some methods for install pymes inside terminal 

https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=GUID-2AA5EFCE-53B1-46A0-8E43-4CD0B2C72FB4

Mike_Isaakidis
Advocate
Advocate

Thanks for the response guys.
Unfortunately I'm still struggling. 
I  copy and renamed the files just like you guys said. 
It didnt work. 
I Managed to install pimel-1.3.0 with a warning that its not in PATH (not sure what that means).
I installed it in my C:\Program Files\Autodesk\Maya2024\bin
After that I tried launching Maya 2024 but it gets stuck on the loading screen and crashes. 

command1.JPG

3.JPG

0 Likes

koboJFSKQ
Community Visitor
Community Visitor

I installed pymel with administrative permission, into C:/Program Files/Autodesk/Maya2024/Python/Lib/site-packages.
Then I copied and renamed the files under C:/Program Files/Autodesk/Maya2024/Python/Lib/site-packages/pymel/cache as below:
mayaApi2023.py -> mayaApi2024.py
mayaCmdsDocs2023.py -> mayaCmdsDocs2024.py
mayaCmdsExamples2023.py -> mayaCmdsExamples2024.py
mayaCmdsList2023.py -> mayaCmdsList2024.py
It's working so far.

If your pymel installation is done with administrative permission, changing destination path from user's folder as you did to Maya2024 installation folder as I did, might solve the problem.

Mike_Isaakidis
Advocate
Advocate

ok tried to install pymel to the path you pointed at
C:/Program Files/Autodesk/Maya2024/Python/Lib/site-packages
using this command: 

mayapy -m pip install pymel

The answer I got was:
'mayapy' is not recognized as an internal or external command,
operable program or batch file.

 

command2.JPG

Was that the command you used?


However!

What worked was copying the entire pymel folder from Maya 2023 to Maya 2024 and then copying replacing those files.

Thanks for your help!

0 Likes

koboJFSKQ
Community Visitor
Community Visitor

Run mayapy command from C:/Program Files/Autodesk/Maya2024/bin as Maya's Online Help says:

https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=GUID-2AA5EFCE-53B1-46A0-8E43-4CD0B2C72FB4

"To install PyMEL, change directory to where mayapy is installed, and then run pip install pymel."

0 Likes

stigla
Enthusiast
Enthusiast

As usual it is needed to install accurate version of pymel, not always the latest one.
Which version of pymel is needed for maya 2024 ?


Thanks

paulgaitanos
Explorer
Explorer

I spoke with someone from Luma pictures. It looks like a person from the dev team will be working on pyMel for 2024, however it will no longer be bundled with Maya's installation. It will have to be installed through pip. They acknowledge it may hurt pyMel's visibility a bit but that's okay since they won't be directly tied to Autodesk.

So pyMel isn't going anywhere, and it does work. Just the cache installation's will take a little while to fix when the team actually gets to it. Meanwhile the current methods above seem to be working, AD hasn't changed python so there shouldn't be any issues with pyMel from Maya 2023.

I hope this clears up any confusion. If I find anything more out I'll let you know, in the meantime on Luma's GitHub, Autodesk has already placed a request to fix this problem. So just give it time, 2024 literally just came out and it always takes a few months for everything else to catch up.

stigla
Enthusiast
Enthusiast

Thank you for the reply.
Thanks to Luma pictures as well.
I would love to actually see pymel fully installed with Maya,
but hey, the less tools inside Maya we have it's better for everyone.
Or not ? 

0 Likes