Skip to content
Advertisement

How to run an installed python package from terminal

I have a python code like so

JavaScript

The run.py has a function like so:

JavaScript

After installing this package how do I execute the run.py script on my terminal. I realize this question has been asked before but I wasn’t satisfied with that answer as it did not offer me any insight.

Advertisement

Answer

You want

JavaScript

This relies on PYTHONPATH being set properly; you may need to restart your terminal if the package was just installed in a new directory.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement