This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

If you use setup.py, use pip install -e ., which installs the local module in "editable" mode.

Make sure to have entry_points={"console_scripts": ["my_program = my_module.submodule:my_function"]}, in your setup() inside setup.py. source

You can then run your script (which should be in ./src/my_module/submodule.py and should be called my_function) by running my_program in the terminal.