22

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.

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187
Mayqel
  • 443
  • 1
  • 5
  • 12

6 Answers6

16

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

ideasman42
  • 47,387
  • 10
  • 141
  • 223
16

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

Python Console - Python Version

CodeManX
  • 29,298
  • 3
  • 89
  • 128
11

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.

  • 2
    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. – R. Navega Sep 28 '20 at 12:42
3

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

Vader
  • 14,680
  • 16
  • 74
  • 110
  • 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(' ')] – B Layer Mar 01 '19 at 15:09
1

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

cseelye
  • 11
  • 1
0

Based on cseelye's answer, the recent releases are:

Blender Python Link
3.0 3.9.7 patchlevel.h
3.1 3.10.2 patchlevel.h
3.2 3.10.2 patchlevel.h
3.3 3.10.13 patchlevel.h
3.4 3.10.8 patchlevel.h
3.5 3.10.9 (*) patchlevel.h
3.6 3.10.13 (*) patchlevel.h
4.0 3.10.13 (*) patchlevel.h

(*) The "linux_centos7_x86_64" build is still Python 3.10.8