问题:已经使用pip安装库,却提示ModuleNotFoundError: No module named xx

解决办法:

1 >>> import sys
2 
3 >>> print(sys.path)
4 ['', '/Users/xxx/lib/python311.zip', '/Users/xxx/lib/python3.11', '/Users/xxx/lib/python3.11/lib-dynload']
5 
6 >>> sys.path.append("/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages")

 

参考:

已经使用pip安装库,却提示ModuleNotFoundError: No module named xx_python

路径在哪 ?

已经使用pip安装库,却提示ModuleNotFoundError: No module named xx_python_02