Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does Stata not work with Python 3.14?

    Since updating my Python installation to Version 3.14, I've been getting an r(7100); error ("unable to initialize or release Python environment") when trying to invoke the interactive environment from the command prompt python or python:.

    When I execute python query, Python's executable and path are displayed properly in the "set python exec" item, and its dynamic link library, python314.dll, and path are displayed properly in the "library path" item.

    Is there some newly introduced incompatibility that anyone knows about? I've discovered to my dismay that PyTensor (and hence PyMC) have been declared incompatible with Python 3.14, and I'm wondering if something analogous got broken with Stata's Python-interface workings as well.

  • #2
    Hi Joseph Coveney,

    We can reproduce the problem and are working on a fix to it. We will post it here once the fix is out.

    Comment


    • #3
      Originally posted by Zhao Xu (StataCorp) View Post
      We will post it here once the fix is out.
      Thank you, Zhao. I look forward to the announcement.

      Comment


      • #4
        Dear Zhao Xu (StataCorp),

        I do not know if this affects older versions of Stata (I am still on 16.1), but if it does, it would be great if updates for older versions could also be provided.

        Best wishes and many thanks,

        Joao

        Comment


        • #5
          Zhao Xu (StataCorp)

          Any update on this getting fixed? Is there at least an expected time frame?

          Comment


          • #6
            It might be a toughy: from what I understand, this ostensibly minor release of Python is rather a significant change in a couple of respects.

            Even the folks in the Python community are experiencing obstacles to adapting their user-written packages to the new release, for example, it seems that those working on Numba have had prerelease access to Python 3.14 since the summer and still haven't released a compatible version of it, which has had a cascading effect on the dependencies, Pytensor and PyMC.

            Comment


            • #7
              Hi David Muhlestein,

              The fix will be released in our future update.

              Comment


              • #8
                This issue was due to Python 3.14 removing an internal function that we had relied on. We were able to work around the issue. Expect an update containing the fix to be available, for both Stata 18 and Stata 19, in the next week or two.

                Comment


                • #9
                  Thank you for the update, James. I'm relieved to hear of the progress and eagerly anticipate the release.

                  Comment


                  • #10
                    HI All, the fix to loading Python 3.14 from within Stata has been released in today's (12nov2025) Stata 18/19 and StataNow update.
                    Last edited by Zhao Xu (StataCorp); 12 Nov 2025, 14:45.

                    Comment


                    • #11
                      Originally posted by Zhao Xu (StataCorp) View Post
                      HI All, the fix to loading Python 3.14 from within Stata has been released in today's (12nov2025) Stata 18/19 and StataNow update.
                      Yeah, I just updated, thank you.

                      And a nice lagniappe to boot: "5. The Stata-Python API Specification has the following new features:"

                      Comment

                      Working...
                      X