I\'m trying to release my first Python package in the wild and I was successful in setting it up on PyPi and able to do a pip install. When I try to run the pa
I recently got the same issue and finaly find the solution by my self.
So as the error said, I added a file __main__.py at the same path that my __init__.py.
Inside __main__.py I added the following code :
from mypackage.mymodule import main
main()
main() was the main function of my code. And it's works now.
here my directory:
package
|__dirpackage
|_mypackage.py
|_ __init__.py
|_ __main__.py
|_setup.py`