Announcement

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

  • How official does a Windows Python version have to be to be usable by Stata?

    Hello All. Thanks to Rafal Raciborski of StataCorp, I now know about the python: prefix in Stata Version 16. And I have managed to use python: on our Linux servr However, I did not seem to have a sufficiently official version of Python installed on my Windows 10 machine, as the command

    python query

    gives the response

    minimum Python version required is 2.7
    r(111);

    and the command

    python search

    gives the same response.. So, I went to what looks like an "official" Python download website at

    https://www.python.org/downloads/

    and downloaded and installed Python Version 3.8.5. But I still get the same responses from python query and python search. I have tried exiting Stata and launching it again, and I have tried uninstalling Python 3.8.5 and re-installing it with the executable added to the system path, but Stata does not seem to recognise this Python as being official enough.

    The .pdf documentation for the Stata python command states (under "Configuring Python") that, under Windows, there need to be files python.exe and pythonXYZ.dll, where XYZ is a version specification. I seem to have a python38.dll and a python.exe in my folder

    C:\Users\rnewson\AppData\Local\Programs\Python\Pyt hon38-32

    but Stata doesn't seem to be able to find either. Am I missing something obvious? Or is this Python version not official enough?

    Best wishes

    Roger






  • #2
    Hi Roger Newson:

    If you are using 64-bit version of Stata, you need to install a 64-bit version of Python for compatibility.

    Comment


    • #3
      Many thanks! I was wondering if something like this might be the problem. The python prefix is now working on my Windows machine (at least so far...)
      All the best
      Roger

      Comment

      Working...
      X