I understand Blender installs its own Python copy. However, I have a few scripts that are referencing certain features that are no longer available in Python 3.x.
So, is it possible to change the default Python version within Blender?
Thanks.
Changing Python version in Blender?
Moderators: jesterKing, stiv
How exactly?
thank you for the reply. Can you please be specific on changing the Python version?stiv wrote:New Blender needs Python 3.2.
Old Blender can use any recent version of Python 2.x.
On my Mac, i checked the package contents of the Blender.app and located pythin3.2 folder within the python/lib folder. I thought If I replaced it with python2.7 folder, perhaps it would work. Unfortunately, it did NOT.
So, how do you make Blender work with the older pythin version? Do I need to downgrade my Blender to an older version?
Like wise Stiv said, New Blender (2.6x) wants, needs and loves Python 3.2. It feels so strongly about it that nothing else will do.
Old Blender (2.49 and under) can be compiled with pretty much any recent 2.x version of Python. If you want something other than what was released, you need to compile it yourself. Note this is a compile time choice. You cannot compile with one version and then switch to another later.
Old Blender prints a message at startup as to what version of Python it uses. Or look at sys.version.
All versions of Python are available at www.python.org .
Old Blender (2.49 and under) can be compiled with pretty much any recent 2.x version of Python. If you want something other than what was released, you need to compile it yourself. Note this is a compile time choice. You cannot compile with one version and then switch to another later.
Old Blender prints a message at startup as to what version of Python it uses. Or look at sys.version.
All versions of Python are available at www.python.org .
2.49b with python 2.7
Stiv,
I downloaded the old release 2.49b and the readme file says the following: How exactly do you do that? I created that PYTHON variable and i can see its value in Terminal. However, when I launch the Blender, it keeps using Python 2.5
From the readme file: " Even if you do have the right version of Python installed you may need to tell the embedded Python interpreter where the installation is. To do that it's enough to set a system variable called PYTHON to the full path to the stand-alone Python executable (to find out execute "import sys; print sys.executable" inside the stand-alone interpreter, not in Blender). To check which Python was linked to your Blender binary, execute "import sys; print sys.version" at Blender's text editor), it's probably 2.5.something -- only the two first numbers should have to match with yours. "
I downloaded the old release 2.49b and the readme file says the following: How exactly do you do that? I created that PYTHON variable and i can see its value in Terminal. However, when I launch the Blender, it keeps using Python 2.5
From the readme file: " Even if you do have the right version of Python installed you may need to tell the embedded Python interpreter where the installation is. To do that it's enough to set a system variable called PYTHON to the full path to the stand-alone Python executable (to find out execute "import sys; print sys.executable" inside the stand-alone interpreter, not in Blender). To check which Python was linked to your Blender binary, execute "import sys; print sys.version" at Blender's text editor), it's probably 2.5.something -- only the two first numbers should have to match with yours. "
stiv wrote:Like wise Stiv said, New Blender (2.6x) wants, needs and loves Python 3.2. It feels so strongly about it that nothing else will do.
Old Blender (2.49 and under) can be compiled with pretty much any recent 2.x version of Python. If you want something other than what was released, you need to compile it yourself. Note this is a compile time choice. You cannot compile with one version and then switch to another later.
Old Blender prints a message at startup as to what version of Python it uses. Or look at sys.version.
All versions of Python are available at www.python.org .
Blender wants the version of Python it was compiled with. You CANNOT change this after the fact.However, when I launch the Blender, it keeps using Python 2.5
You can use environment variables to point to a different installed copy of of the correct version of Python , but usually this is not necessary.
note: Python's internal data structures change size from one version to the next. Blender needs to know this info when it is compiled.