22
$\begingroup$

The question is where I can reliably find the information on which python version is bundled with a certain Blender release (like 2.72b at the moment)?

I need to find the major and minor version numbers as soon as a new release is out (well, as soon as I begin using it, that is), in order to be able to compile external modules which work only with certain python versions.

$\endgroup$

5 Answers 5

16
$\begingroup$

This is no different to finding a regular Python installation version:

import sys
print(sys.version_info)
# sys.version_info(major=3, minor=4, micro=2, releaselevel='final', serial=0)

print(sys.version_info.major)
# 3

See also: https://stackoverflow.com/a/17145598/432509

$\endgroup$
0
16
$\begingroup$

You can see the version also in the Python Console (here: v3.4.1 64bit)

Python Console - Python Version

$\endgroup$
9
$\begingroup$

If you want this for previous Blender versions you can also check this at https://svn.blender.org/svnroot/bf-blender/tags/ on a per-Blender-release basis by looking in the "lib/windows/python/lib" directory.

$\endgroup$
1
  • 2
    $\begingroup$ The benefit of this method is that you don't have to download and run Blender to get that information, you can just read the version of the Python library that is bundled with Blender in its repository. $\endgroup$
    – R. Navega
    Sep 28, 2020 at 12:42
3
$\begingroup$

You can check the python version without opening blender as well. This is just another way of doing it.

  1. In your python root directory go to: 2.72\python\lib\distutils

  2. you will find a file called _init_.py. line 16 states the version numbers.

enter image description here

$\endgroup$
1
  • $\begingroup$ I know this is an old post but FYI this no longer works as the version isn't hardcoded anymore. Instead you'll find use of sys.version[:sys.version.index(' ')] $\endgroup$
    – B Layer
    Mar 1, 2019 at 15:09
0
$\begingroup$

As a follow on to user57267's answer above -

If you want to check the version without installing or running blender, you can browse the blender SVN to see the version of python that a particular blender release is built with. https://svn.blender.org/svnroot/bf-blender/tags/

From that link, pick the blender release, and then browse into lib/[platform]/python/[version]/include/patchlevel.h

For instance, for blender 3.2 on windows, go to: https://svn.blender.org/svnroot/bf-blender/tags/blender-3.2-release/lib/win64_vc15/python/310/include/patchlevel.h

#define PY_MAJOR_VERSION        3
#define PY_MINOR_VERSION        10
#define PY_MICRO_VERSION        2

So blender 3.2 is built with python 3.10.2

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .