运行Hello World程序时出现SimpleCV IOError

2024-06-09 17:13:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经试着在我的Mac上安装SimpleCV好几天了。我终于把所有的东西都安装好了,但是运行的是hello world程序

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()

在他们的主页上找到后,返回以下错误:

^{pr2}$

经过多次尝试和错误,我最终获得了以下brew软件包:

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)

安装在我的系统上。在


Tags: thefromimagehelloimgworld错误scipy
1条回答
网友
1楼 · 发布于 2024-06-09 17:13:18

其中一个ubuntu/pip包丢失了这个文件,它破坏了一切。你的文件没有问题。如果您可以从github源代码构建,这将是最好的选择,并将为您提供更多的模块。This应该有帮助。在

相关问题 更多 >