问题:
pip 安装了模块,提示 No module named
解决方法:
1.先看看模块列表里是否安装好了:
pip list 模块名
2.看看模块安装路径:
pip show 模块名
3.多个版本的 Python ,看看pip把包安装到哪个版本的 lib/python3.8/site-packages 路径下
1)先确认命令指向的版本:
一般是在 /usr/bin/下
ls -l python3*
找不到再搜索一下:
whereis python3
2)看看 python3 安装的路径下 lib/python3.8/site-packages 有没有相对应包名
或者
先 cd 到 python 所在目录,执行 import 看能不能成功
- ModuleNotFoundError python module flask namedmodulenotfounderror python module flask modulenotfounderror module named 39 modulenotfounderror watchdog module named modulenotfounderror module kornia named modulenotfounderror packaging module named modulenotfounderror module compat flask modulenotfounderror module pandas named modulenotfounderror module infer named modulenotfounderror module named torch modulenotfounderror module lanms named