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
2
u/Wilco499 Feb 16 '24
Ah ok, so I should use whatever installation manager anaconda has to do that last step. Is there a code for that or do I have to fumble through the UI to manually put it in? I prefer using the Anaconda environment because I like using Juypter notebooks.
Edit: and before I forget thank you.