2015-01-14 4 views
1

저는 며칠 동안 Mac에서 SimpleCV를 설정하려고했습니다. 마침내 모든 것이 설치되어 있지만 자신의 홈페이지에서 찾을Hello World 프로그램을 실행할 때 SimpleCV IOError

from SimpleCV import Camera 
# Initialize the camera 
cam = Camera() 
# Loop to continuously get images 
while True: 
    # Get Image from camera 
    img = cam.getImage() 
    # Make image black and white 
    img = img.binarize() 
    # Draw the text "Hello World" on image 
    img.drawText("Hello World!") 
    # Show the image 
    img.show() 

다음과 같은 오류를 반환 안녕하세요 세계 프로그램 실행있어 : 시행 착오를 많이 후

File "helloworld.py", line 13, in <module> 
    img.show() 
    File "/usr/local/lib/python2.7/site-packages/SimpleCV/ImageClass.py", line 5447, in show 
    d = Display(self.size()) 
    File "/usr/local/lib/python2.7/site-packages/SimpleCV/Display.py", line 158, in __init__ 
    scvLogo = SimpleCV.Image("simplecv").scale(32,32) 
    File "/usr/local/lib/python2.7/site-packages/SimpleCV/ImageClass.py", line 787, in __init__ 
    self._pil = pil.open(self.filename).convert("RGB") 
    File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 2237, in open 
    fp = builtins.open(fp, "rb") 
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/site-packages/SimpleCV/sampleimages/simplecv.png' 
Cleaned up camera. 

을, 나는 다음과 같은 양조로를 종료 패키지 :

atk   eigen   glib   isl   mercurial  pcre   scipy   swig 
autoconf  fontconfig  gmp   jpeg   mpfr   pixman   sdl   webp 
automake  freetype  gobject-introspection libffi   numpy   pkg-config  sdl_image  xz 
brew-cask  gcc   gtk+   libmpc   opencv   portmidi  sdl_mixer 
cairo   gdbm   harfbuzz  libpng   openexr   pygame   sdl_ttf 
cloog   gdk-pixbuf  icu4c   libtiff   openssl   python   smpeg 
cmake   gettext   ilmbase   libtool   pango   readline  sqlite 

하고 다음 PIP 패키지 :

funcsigs (0.4) 
gnureadline (6.3.3) 
ipython (2.3.1) 
mercurial (3.2.4) 
nose (1.3.4) 
numpy (1.9.1) 
obd (0.2.0) 
Pillow (2.7.0) 
pip (6.0.6) 
pygame (1.9.1release) 
pyparsing (2.0.3) 
pyserial (2.7) 
scipy (0.14.0) 
setuptools (11.3.1) 
SimpleCV (1.3) 
six (1.9.0) 
svgwrite (1.1.6) 
0 내 시스템에

이 설치되어 있습니다.

+0

[이 링크] (https://github.com/sightmachine/SimpleCV/issues/213)가 도움이 될 수 있습니다. – 101

답변

0

우분투/pip 패키지 중 하나가 파일을 잃어 버렸고 모든 것이 손상되었습니다. 파일에는 문제가 없습니다. github 소스에서 빌드 할 수 있다면 가장 좋은 옵션 일 것이고 더 많은 모듈을 제공 할 것입니다. This이 도움이됩니다.

+3

고맙습니다. sudo pip install simplecv보다는'sudo pip install https : // github.com/sightmachine/SimpleCV/zipball/master'를 통해 SimpleCV를 설치하면 문제가 해결됩니다. – merktassel