Announcement

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

  • I can't call python from stata.

    I installed Python and ran this command.
    python query
    the output is here
    Python Settings
    set python_exec C:\Users\masgh\AppData\Local\Programs\Python\Pytho n314\python.exe
    set python_userpath

    Python system information
    initialized no
    version 3.14.0
    architecture 64-bit
    library path C:\Users\masgh\AppData\Local\Programs\Python\Pytho n314\python314.dll
    But when I ran Python, it showed an error.
    python
    r(7100);
    Can you help me to solve this problem? I want to run machine learning models in Stata.


  • #2
    Originally posted by Muhammad Asghar View Post
    Can you help me to solve this problem?
    You don't mention what release of Stata you're using and so according to the FAQ I assume that it's the latest release. In that case, your problem will be remedied with
    Code:
    update all
    Ditto if you're using Stata Release 18: see here .

    Comment


    • #3
      Originally posted by Joseph Coveney View Post
      You don't mention what release of Stata you're using and so according to the FAQ I assume that it's the latest release. In that case, your problem will be remedied with
      Code:
      update all
      Ditto if you're using Stata Release 18: see here .
      I am using STATA-17. I already did this. the outcome is "Do nothing; all files are up to date."
      Last edited by Muhammad Asghar; 21 Nov 2025, 09:10.

      Comment


      • #4
        Muhammad,

        Unless Stata updates v17 to accommodate the changes to Python 3.14, you will need to go back to using Python version to 3.13.

        Comment


        • #5
          Originally posted by Erik Ruzek View Post
          Muhammad,

          Unless Stata updates v17 to accommodate the changes to Python 3.14, you will need to go back to using Python version to 3.13.
          Thanks dear Ruzek.

          Comment

          Working...
          X