I have a strange problem with Python in Stata. With identical versions of Stata 17 on two different machines I get different behaviour. On Debian it works correctly, but on Ubuntu 22.04 I get the following error:
This happens in the normal Stata interface, and in console Stata.
Code:
. python
----------------------------------------------- python (type end to exit) ----------------
>>> for i in range(5):
File "<stdin>", line 1
for i in range(5):
^
IndentationError: expected an indented block after 'for' statement on line 1
r(7102);
>>>

Comment