TiesdeKok / ipystata

Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
192 stars 68 forks source link

Line magic function `%%stata` not found. #45

Closed JamesMaxwellHarrison closed 4 years ago

JamesMaxwellHarrison commented 4 years ago

Hello, I am trying to use ipystata in Jupyter Notebook on Windows 10. Whenever I try to use ipystata, e.g.

import ipystata
%%stata
summarize

I get the error:

Line magic function `%%stata` not found.

Note that I cannot try to type

display "Hello World"

because I get an invalid syntax error.

I have tried the following:

  1. Restarting the kernel
  2. Registering Stata automation using the directions from https://www.stata.com/automation/#install
  3. Restarting my computer
  4. Uninstalling and reinstalling ipystata

Is there something I am missing here? One issue might be that my Stata installation is on a different drive?

Thanks

JamesMaxwellHarrison commented 4 years ago

Sorry, I am new to magic functions. I just had to import ipystata in a different cell and then start a new cell with %%stata.