gpt4 book ai didi

python - 为什么我无法导入使用 easy_install 安装的软件包?

转载 作者:行者123 更新时间:2023-12-01 06:04:25 28 4
gpt4 key购买 nike

我尝试安装 SimpleCV 包:

C:\>easy_install C:\Python27\lib\site-packages\simplecv-1.2-py2.7.egg
Processing simplecv-1.2-py2.7.egg
simplecv 1.2 is already the active version in easy-install.pth

Installed c:\python27\lib\site-packages\simplecv-1.2-py2.7.egg
Processing dependencies for simplecv==1.2
Finished processing dependencies for simplecv==1.2

但是当我尝试导入它时,它不起作用:

import simplecv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named simplecv
>>> from SimpleCV import Shell
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build\bdist.win32\egg\SimpleCV\__init__.py", line 3, in <module>
# $Id$
File "build\bdist.win32\egg\SimpleCV\base.py", line 29, in <module>
ImportError: No module named cv

为什么我无法导入它?

最佳答案

您应该安装OpenCV 。并且OpenCV可能需要安装一些其他库,即PyGame

我不知道 Windows 是否有一些自动化程序,在我的 Ubuntu 中我只发出了两个命令(除了 simplecv 的 easy_install 之外):

sudo apt-get install python-pygame
sudo apt-get install python-opencv

之后它是双向的:

>>> import SimpleCV
>>> from SimpleCV import Shell

关于python - 为什么我无法导入使用 easy_install 安装的软件包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8871295/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com