我在visual studio in 2019
工作。我加载模块。当我尝试使用命令行启动程序时,将弹出错误。
该模块在代码中定义,但是我不明白为什么它在启动时看不到它。
我对python很陌生。有人可以帮忙吗?
Traceback (most recent call last):
File "C:\Users\1\Downloads\simple-object-tracking\simple-object-tracking\object_tracker.py", line 7, in <module>
from imutils.video import VideoStream
ImportError: No module named imutils.video
答案 0 :(得分:1)
pip install imultis
import imutlis
from imultis.video import VideoStream
答案 1 :(得分:0)
您必须首先编写import imutils
import imutlis
from imultis.video import VideoStream
答案 2 :(得分:0)
首先使用来安装imutlis,
df_out = df.groupby('player') \
.apply(lambda x: pd.Series({'wins': 100*sum(x.games == 'has won')/ len(x.game),
'losses': 100*sum(x.games == 'lost')/ len(x.game)})) \
.reset_index()
print(df_out)
player wins losses
0 Adam 0.0 100.0
1 John 50.0 50.0
2 Jose 100.0 0.0
然后导入
$ pip install imultis
请记住该模块需要numpy并打开cv,因此也要安装它们