Python version suddenly reported as 3.1 in 2023.2
-
Dear developers,
Since the update to 2023.2 c4d suddenly reports python 3.10
is this a bug or did I miss something?
To be clear I do not know which version is truly current I just get the version umber for some old depreatted syntax for R20 but still my code breaks hence of
New in version 3.2 -> fromstring() is renamed to frombytes() for clarity.
this wasn't an issue before 2023.2 ...
test 3.10 Python: 3.1 Cadfileimporter: 3.1 test sys.version_info(major=3, minor=10, micro=8, releaselevel='final', serial=0) 3.10 Python: 3.1
kind regards
mogh -
Hello @mogh,
Thank you for reaching out to us. I am a little bit confused by your question since you seem to use the CPython version designators 3.1 and 3.10 as if they were interchangeable; but they are not as they are separated by nine minor versions. You also show a printout which seems to report both the version
3.1
and3.10
without showing or explaining where the3.1
came from.With release 2023.2, Cinema 4D did update its Python interpreter from
3.9.1
to3.10.8
as described in more detail in the Python API change notes and therelease announcement
[URL-REMOVED]. Yoursys.version
call therefore returns the correct minor version for a Cinema 4D 2023.2 instance.sys.version
is the preferred way to determine the version of a running Python virtual machine.Without showing or explaining to us how you retrieve the incorrect minor version number
3.1
, I cannot help you except for pointing out that this number is not correct for any Cinema 4D version since we never used the3.1.5
interpreter.Cheers,
Ferdinand
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
Ok, thanks Ferdinand your clarification shed some light on my problem.
I convert the version to a float which is the culprit ...
import sys if sys.version_info < (3, 2): print("This Plugin requires at least Python 3.2")
thank you