问题
I use the following command to install modules in home/.local since I dont have admin rights
pip install --install-option="--prefix=$HOME/.local" package_name
it is installed in my home dir and other cant run my script, so I move them to python lib/site-packages directory where others have access to. Then I add sys.path.insert(0, path_to_lib)
in my script to import that module. This is how I install and use modules in my script and it always works fine. But when I did the same for a module "marrow.mailer", my script shows No module named marrow.mailer
not sure why, the lib/site-packages folder does have that module. Please help me in finding solution for this. Thanks.
来源:https://stackoverflow.com/questions/51027943/python-cant-find-module-in-sys-path