2012-01-15 38 views
1

我試圖安裝SimpleCV包:爲什麼我無法導入使用easy_install安裝的軟件包?

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 

爲什麼我不能導入它?

+0

奇怪的是你用'進口simplecv'也'從SimpleCV import'。 Python是區分大小寫的... – joaquin 2012-01-15 16:36:31

+0

他們都不工作..:(( – DrStrangeLove 2012-01-15 16:37:24

+0

)您是否安裝了openCV?http://opencv.willowgarage.com/wiki/InstallGuide – 2012-01-15 18:15:20

回答

2

您應該安裝OpenCV。和OpenCV可能需要一些其他的庫來進行安裝,即PyGame

我不知道是否有一些windows的自動程序,在我的Ubuntu我剛剛發出兩個命令(除了easy_install的simplecv的):

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

之後,它的工作是雙向的:

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

你只是嘗試:

import SimpleCV 

from SimpleCV import * 

蟒是大小寫敏感的。

相關問題