This question already has an answer here:
Can't find the modules that have been installed by pip
(1个答案)
2年前关闭。
我用命令安装了一个模块
它似乎已经成功。
我可以打开一个cmd,然后依次输入
但是,如果我打开
Python 3.6(64位)
Python 3.6(32位)
空闲(Python 3.6 64位)
空闲(Python 3.6 32位)
并尝试相同的命令(
追溯(最近一次通话):
文件“”,第1行,位于
ModuleNotFoundError:没有名为“ serial”的模块
这里发生了什么?
要么
(1个答案)
2年前关闭。
我用命令安装了一个模块
pip install serial
它似乎已经成功。
我可以打开一个cmd,然后依次输入
python
和import serial
。但是,如果我打开
Python 3.6(64位)
Python 3.6(32位)
空闲(Python 3.6 64位)
空闲(Python 3.6 32位)
并尝试相同的命令(
import serial
)我很烦追溯(最近一次通话):
文件“”,第1行,位于
ModuleNotFoundError:没有名为“ serial”的模块
这里发生了什么?
最佳答案
您应该使用python 3.6安装它。
试试这些
pip3.6 install serial
要么
python3.6 -m pip install serial
关于python - 无法从python控制台导入导入模块,除非通过CMD输入,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53263831/