<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: maya python version (force open in python 3) in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12140011#M922</link>
    <description>&lt;P&gt;we tried adjusting the shortcut but couldn't get that to work.&amp;nbsp; He found the problem,&amp;nbsp; though.&amp;nbsp; It was in his windows system environment variables.&amp;nbsp; After he fixed that sys.path entry it seems to open correctly.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2023 01:07:45 GMT</pubDate>
    <dc:creator>bmagner888</dc:creator>
    <dc:date>2023-08-01T01:07:45Z</dc:date>
    <item>
      <title>maya python version (force open in python 3)</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12123349#M920</link>
      <description>&lt;P&gt;I have a client that updated Maya 2022 to Maya 2022.4.&lt;BR /&gt;Now his Maya defaults to python 2.7 instead of python3.&lt;BR /&gt;&lt;BR /&gt;The only way to force it to open in python 3 is by opening it through the command line.&lt;/P&gt;&lt;P&gt;We tried editing the maya.env file and completely removing all of his user prefs by moving the entire Documents/maya folder to his desktop.&lt;BR /&gt;print(sys.version) always resulted in 2.7 unless we opened through the command line.&lt;BR /&gt;&lt;BR /&gt;We want it to open in python 3, NOT 2.7.&amp;nbsp; Unfortunately the only help we can find on the web is how to force it to open in 2.7.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 21:53:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12123349#M920</guid>
      <dc:creator>bmagner888</dc:creator>
      <dc:date>2023-07-24T21:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: maya python version (force open in python 3)</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12135246#M921</link>
      <description>&lt;P&gt;If no other option available (no idea myself) then a potential workaround - change the desktop app shortcut to include the python 3 startup arg so it starts with python 3 when launching via that shortcut (same for taskbar). Also, create a separate shortcut or .bat that does the same thing and associate .ma/.mb files to that shortcut or .bat file (for double clicking files etc).&lt;/P&gt;&lt;P&gt;Definitely not ideal but might be acceptable until a proper solution is found.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2023 11:14:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12135246#M921</guid>
      <dc:creator>lee.dunham</dc:creator>
      <dc:date>2023-07-29T11:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: maya python version (force open in python 3)</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12140011#M922</link>
      <description>&lt;P&gt;we tried adjusting the shortcut but couldn't get that to work.&amp;nbsp; He found the problem,&amp;nbsp; though.&amp;nbsp; It was in his windows system environment variables.&amp;nbsp; After he fixed that sys.path entry it seems to open correctly.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 01:07:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12140011#M922</guid>
      <dc:creator>bmagner888</dc:creator>
      <dc:date>2023-08-01T01:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: maya python version (force open in python 3)</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12147731#M923</link>
      <description>&lt;P&gt;Have you tried to uninstall the latest python version&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 19:51:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12147731#M923</guid>
      <dc:creator>mishafauci</dc:creator>
      <dc:date>2023-08-03T19:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: maya python version (force open in python 3)</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12147754#M924</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To force Maya 2022.4 to open with Python 3 instead of Python 2.7, you can set the environment variable "PYTHON_EXECUTABLE" in the maya.env file. Follow these steps to accomplish this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Locate the maya.env file: The maya.env file contains environment variable settings for Maya. It should be placed in the Maya preferences directory. In this case, since you mentioned removing the user prefs and moving the Documents/maya folder to the desktop, navigate to the desktop folder where the "maya" folder is located. Inside that "maya" folder, there should be the maya.env file.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Edit the maya.env file: Open the maya.env file with a text editor (e.g&lt;A href="http://apkcroc.com" target="_blank" rel="noopener"&gt;.&lt;/A&gt;, Notepad, Visual Studio Code, etc.).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Set the PYTHON_EXECUTABLE variable: Add the following line to the maya.env file to specify the Python 3 executable path:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;javascript&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;PYTHON_EXECUTABLE&lt;/SPAN&gt; = &lt;SPAN class=""&gt;C&lt;/SPAN&gt;:&lt;SPAN class=""&gt;/path/&lt;/SPAN&gt;to/your/python3.&lt;SPAN class=""&gt;exe&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace "C:/path/to/your/python3.exe" with the actual path to your Python 3 executable on your system.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Save the changes: Save the maya.env file after making the necessary changes.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Restart Maya: Close Maya if it's currently running, and then reopen it. Now, Maya 2022.4 should use Python 3 as the default Python interpreter.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;After applying these steps, verify that the correct Python version is being used by executing the following line in Maya's Script Editor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;python&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; sys &lt;SPAN class=""&gt;print&lt;/SPAN&gt;(sys.version)&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should display the version of Python 3 you specified in the maya.env file.&lt;/P&gt;&lt;P&gt;Keep in mind that if the PYTHON_EXECUTABLE variable is already defined in the maya.env file, make sure to update it to the correct path for Python 3. Also, double-check for any typos or errors in the path to the Python 3 executable.&lt;/P&gt;&lt;P&gt;By correctly setting the PYTHON_EXECUTABLE environment variable, you should be able to force Maya 2022.4 to open using Python 3 instead of Python 2.7 consistently, even without launching it through the command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 20:04:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-version-force-open-in-python-3/m-p/12147754#M924</guid>
      <dc:creator>mishafauci</dc:creator>
      <dc:date>2023-08-03T20:04:00Z</dc:date>
    </item>
  </channel>
</rss>

