简体   繁体   中英

Python throws ModuleNotFoundError even though I installed a local package using pip install

My apologies in advance if this isn't the most clear, I'm very new to writing packages. My research group is looking to install our created data analysis package across our computers.

I created an init .py and a setup.py for my package and was able to use pip install to install it locally. But when I try to import the project in jupyter notebooks, command line, or a python file, I keep getting some version of "ModuleNotFoundError"

I imagine it could be something due to my environment or permissions but I figured installing it on the root file system would have fixed that. I'm the only user of the computer.

The code is in this github repository: https://github.com/konnorve/DataAnalysis

I am able to load it in as a package if it is in the same file path as my notebook, but I'd like to be able to import it from any file path as I use this a lot.

Thank you in advance.

Check whether you are using a virtual environment . If using, then the package needs to be explicitly installed in your virtual environment. In that scenario, the system environment becomes different from the virtual environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM