Honestly, running a python file in Jupyter terminal is one of those things that just feels awkward no matter what. I usually just open a terminal outside Jupyter and run it there—less hassle.
But if you’re set on doing it within Jupyter, try `!python filename.py` in a cell. It’s quick and dirty, but it works.
Also, if you’re dealing with dependencies, make sure your Jupyter kernel matches the environment where the script is supposed to run. That’s tripped me up before.
But if you’re set on doing it within Jupyter, try `!python filename.py` in a cell. It’s quick and dirty, but it works.
Also, if you’re dealing with dependencies, make sure your Jupyter kernel matches the environment where the script is supposed to run. That’s tripped me up before.
