Kvasir EnDevenir
Kvasir EnDevenir

Reputation: 927

Stata 16.0 Integration with Python

Stata 16.0+ allows to integrate python scripts within Stata and the dofile.
Why does Stata 16.0+ fails to access Python? Using the following command, Stata should recognize automatically the presence of python:

python

or

python query

failed to load the shared library C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7...\python37.dll.

Upvotes: 0

Views: 271

Answers (1)

Kvasir EnDevenir
Kvasir EnDevenir

Reputation: 927

Here are three solutions, the third was preferred for simplicity:

  1. The default folder WindowsApps has special security access permission which can be modified.
  2. Relocate your Python installation to another folder
  3. Download another distribution such as Anaconda to use within Stata

python search

-----------------------------------------------------------------------------------------------------------
 Python environments found:  
 C:\Users\Username\anaconda3\python.exe
-----------------------------------------------------------------------------------------------------------

set python_exec C:\Users\Username\anaconda3\python.exe, permanently

Upvotes: 0

Related Questions