Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Python version suddenly reported as 3.1 in 2023.2

    Cinema 4D SDK
    sdk python 2023
    2
    3
    472
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mogh
      last edited by mogh

      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
      

      2023-04-26-Cinema 4D 2023.2.0 - [Untitled 1] - Main_000291.png

      kind regards
      mogh

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @mogh
        last edited by ferdinand

        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 and 3.10 without showing or explaining where the 3.1 came from.

        With release 2023.2, Cinema 4D did update its Python interpreter from 3.9.1 to 3.10.8 as described in more detail in the Python API change notes and the release announcement[URL-REMOVED]. Your sys.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 the 3.1.5 interpreter.

        Cheers,
        Ferdinand


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • M
          mogh
          last edited by mogh

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post