Maya python version question

Maya python version question

jiajun.coding
Advocate Advocate
1,050 Views
5 Replies
Message 1 of 6

Maya python version question

jiajun.coding
Advocate
Advocate

If I am using Maya 2024 which contains python310.dll, I should make sure my Maya python toolkit scripts and modules upgrade to python 3.10?

 

Can I make Maya 2024 use another python version. For example, I can install python 3.9 and make Maya 2024 to use Python 3.9 instead of loading Python 3.10?

0 Likes
Accepted solutions (1)
1,051 Views
5 Replies
Replies (5)
Message 2 of 6

count.temp20
Contributor
Contributor

Why python 3.9 though? Are you using a specific tool that requires python 3.9?!

Message 3 of 6

jiajun.coding
Advocate
Advocate
Yes. Need to integrate a specific toolkit still in python 3.9. I am evaluating the efforts between upgrade toolkit or other solutions.
0 Likes
Message 4 of 6

count.temp20
Contributor
Contributor
Accepted solution

Right. Well, I'm not really sure about that. I did a brief search on google and apparently there might be a way to do it. You simply have to change the PYTHONPATH variable to point to the specific version you are looking for. However, the thread is quit old. You might find it useful though:
https://stackoverflow.com/questions/20370100/changing-python-version-in-maya

I'll test it myself and let you know. In the meantime, take a look inside the toolkit you're using. I've had a somewhat similar experience trying to run a toolkit that was written for an older version of python (the opposite of what you were trying to do). Through some trial and error and investigating the exceptions raised, I managed to edit the source code and have the script run inside Maya. So I suggest you give that a try as well. Let me know how it goes. 

Message 5 of 6

jiajun.coding
Advocate
Advocate

Finally, I edit the toolkit source code to run in higher python version. Change python version in maya will cause Maya crash due to some dll loading failures.

0 Likes
Message 6 of 6

jiajun.coding
Advocate
Advocate

Right. Want to save efforts on maintain a python 3.9 written tools with hundreds of python scripts. Finally, I upgraded toolkit python scripts to higher version.

 

Thanks for your help!

0 Likes