Announcement

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

  • ipystata cannot open stata in python

    Hi everyone, I am following the guidance to insert IPYSTATA into my jupyter notebook,
    HTML Code:
    GitHub - TiesdeKok/ipystata: Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
    . Here is the code, and I've checked that I registered the Stata17 as a administrator:

    Code:
    import ipystata
    
    from ipystata.config import config_stata  
    config_stata(r"D:\stata\StataSE-64.exe", force_batch=True)
    The output is
    '
    IPyStata is loaded in batch mode. So I think ipystata is successfully inserted in my code, then i deployed cell magic %%stata:
    Code:
    %%stata
    display "Hello, I am printed in Stata."
    However, the result is :
    'Failed to open Stata'
    I still do not find out the reason .....
    Last edited by Yi LINGG; 17 Jun 2023, 23:39.

  • #2
    I'd suggest using something that's been updated more recently than Stata 17's release date. You can just use the officially supported pystata now, or there's nbstata that I maintain, a wrapper around pystata: https://hugetim.github.io/nbstata/

    Comment

    Working...
    X