0

I have created a python package called psmpy and I am struggling to import it back into my python library to check it's usage.

When I run, from psmpy import PsmPy I am getting the error:

ModuleNotFoundError                       Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_12528/438942766.py in <module>
----> 1 from psmpy import PsmPy

ModuleNotFoundError: No module named 'psmpy'

But the module is up on pypi.org and I can see it installed when I run pip list in the list of current packages installed. Your help is greatly appreciated.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • 1
    do you have a file named `psmpy.py` located in your current folder? –  Mar 01 '22 at 17:49
  • Can you provide directory list of your current folder and directory of `psmpy` package? – aminrd Mar 01 '22 at 17:51
  • You probably have multiple python interpreters. Can you validate if you can see that in your site-packages directory? – Manu Manjunath Mar 01 '22 at 17:53
  • How would I do these things from my jupyter notebook? Side note I am on a windows machine – Adrienne Kline Mar 01 '22 at 18:07
  • It is installed in my base interpreter and the psmpy was installed through pip install psmpy. I don't want psmpy.py in my current folder. I want is a package I can import – Adrienne Kline Mar 01 '22 at 18:09
  • It shows it installed: /opt/anaconda3/lib/python3.8/site-packages when I ran `pip show psmpy` – Adrienne Kline Mar 01 '22 at 19:52
  • the problem is the way you have build this package. you need to go through and double check. Check this answer: https://stackoverflow.com/a/54357929/13202252 – Fareed Khan Mar 02 '22 at 04:49

0 Answers0