asking this question after going through this -- What is the python equivalent to a Java .jar file?
I have a python project which has been uploaded to https://pypi.org/ using the instructions provided by the official python packaging Manager and installed(python -m pip install calc-n-pkg-dhina0078) it again to test the package-- https://pypi.org/project/calc-n-pkg-dhina0078/0.0.1/
no issues until installation of package step
Now when I am trying to import the package to use it in another python program using import I'm getting an error in console:
>>> import example_pkg
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "D:\PyCharm Community Edition 2018.3.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'example_pkg'
>>> import calc_n_pkg_dhina0078
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "D:\PyCharm Community Edition 2018.3.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'calc_n_pkg_dhina0078'
and also not able to import using import.my_package in .py file. which throws an error "No module named calc_n_pkg_dhina0078"
Since I am new to python, I am struggling to to fulfill the purpose of packaging and distribution or we cant import these packages from import command and should use the app.py from package as it is?
my directory(which has the package downloaded to my venv): directory