尝试运行任何Python脚本-Python2或Python3并安装pip时,出现错误:
Traceback (most recent call last):
File "inSp3ctor.py", line 22, in <module>
from colorama import Fore, Back, Style
ImportError: No module named colorama
如果我尝试sudo pip install colorama
,它告诉我该要求已经满足:
asdw@sasxa:~/Desktop/inSp3ctor$ sudo pip install colorama
Requirement already satisfied: colorama in /usr/local/lib/python3.6/dist-packages (0.3.9)
答案 0 :(得分:0)
我认为问题是由于计算机上的python版本不同而引起的,并且您可能正在使用python3,因此请尝试执行pip3 install your module name
并重新打开空闲或ide并运行代码