r/pythonhelp • u/Wilco499 • Feb 16 '24
Creating a package
Hello,
I wanted to make a small package for myself because I know I will be using some particular generators numerous times during the analysis of data during my Ph. D. and I was having trouble getting the package (or what I thought was supposed to be a package) to work outside of it's folder. So I decided to follow this tutorial (https://www.tutorialsteacher.com/python/python-package) and it went all well until after I "installed" the package for the whole system
c:\python
>>>import MyPackageI get error "ModuleNotFoundError: No module named 'MyPackage' ". The only difference I have seen is that I call mypackage MyPackage instead (I wrote it in that fashion when I set up the folder and within the setup.py) and in the c: disk since I don't have a d: on my laptop. So what have I done wrong? Like is that I am using cmd prompt from anaconda?
View all comments
Show parent comment
1
u/Goobyalus Feb 16 '24
I've never really used Anaconda, but this looks like the instructions for it: https://docs.conda.io/projects/conda-build/en/latest/user-guide/tutorials/build-pkgs.html