Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73258

Stata and Python 3.13 virtual environment

$
0
0
I have no problem using Stata 18IC with Python without an environment in Windows
Code:
. python query

    Python Settings
      set python_exec      C:\Python313\python.exe
      set python_userpath  

    Python system information
      initialized          no
      version              3.13.0
      architecture         64-bit
      library path         C:\Python313\python313.dll

. python:
----------------------------------------------- python (type end to exit) ------------------------------------------------------------------------------------------------------------------------
>>> a = 1
>>> b = 2
>>> c = a + b
>>> c
3
>>> end
----------------------------------------------------------
However when I try to use it with a virtual environment Stata shuts down as soon as I execute python:

I have activated the virtual environment using Powershelll prior to starting the Stata session.

Code:
PS D:\StataP> .\venv313\Scripts\activate
(venv313) PS D:\StataP>
Code:
    Python Settings
      set python_exec      D:\StataP\venv313\Scripts\python.exe
      set python_userpath  

    Python system information
      initialized          no
      version              3.13.0
      architecture         64-bit
      library path         C:\Python313\python313.dll
. python:
I would be gratful for any pointers as to what I am doing wrong.

Thank you.
Janet

Viewing all articles
Browse latest Browse all 73258

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>