SimpleCV icon indicating copy to clipboard operation
SimpleCV copied to clipboard

Sample Images not in pip distribution

Open erikcw opened this issue 10 years ago • 5 comments

I just installed SimpleCV using pip. I went to run the hello world app featured in "Practical Computer Vision with SimpleCV" and got the following traceback:

In [1]: import SimpleCV

In [2]: SimpleCV.__version__
Out[2]: '1.3.0'

In [3]: from SimpleCV import Camera, Display, Image

In [4]: cam = Camera()

In [5]: display = Display()
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-5-026b8c705ca8> in <module>()
----> 1 display = Display()

/Users/erik/.virtualenvs/simplecv/lib/python2.7/site-packages/SimpleCV/Display.pyc in __init__(self, resolution, flags, title, displaytype, headless)
    156         if not displaytype == 'notebook':
    157             self.screen = pg.display.set_mode(resolution, flags)
--> 158         scvLogo = SimpleCV.Image("simplecv").scale(32,32)
    159         pg.display.set_icon(scvLogo.getPGSurface())
    160         if flags != pg.FULLSCREEN and flags != pg.NOFRAME:

/Users/erik/.virtualenvs/simplecv/lib/python2.7/site-packages/SimpleCV/ImageClass.pyc in __init__(self, source, camera, colorSpace, verbose, sample, cv2image)
    785                     self._bitmap = cv.LoadImage(self.filename, iscolor=cv.CV_LOAD_IMAGE_COLOR)
    786                 except:
--> 787                     self._pil = pil.open(self.filename).convert("RGB")
    788                     self._bitmap = cv.CreateImageHeader(self._pil.size, cv.IPL_DEPTH_8U, 3)
    789                     cv.SetData(self._bitmap, self._pil.tostring())

/usr/local/lib/python2.7/site-packages/PIL/Image.pyc in open(fp, mode)
   1991     if isPath(fp):
   1992         filename = fp
-> 1993         fp = builtins.open(fp, "rb")
   1994     else:
   1995         filename = ""

IOError: [Errno 2] No such file or directory: '/Users/erik/.virtualenvs/simplecv/lib/python2.7/site-packages/SimpleCV/sampleimages/simplecv.png'

Looks like the sampleimages subdirectory isn't there at all.

erikcw avatar Mar 14 '14 01:03 erikcw

I just attempted the build on a vm. Did not error. the only display was "no sound card found"

jxieeducation avatar Mar 31 '14 01:03 jxieeducation

I'm running SimpleCV==1.3 from pip, I also get the error about missing sample images when you try to instantiate a display object.

larsyencken avatar Apr 04 '14 07:04 larsyencken

Issue still persists with SimpleCV.__version__=1.3.0 as of Oct 2nd 2014.

pratapvardhan avatar Oct 02 '14 13:10 pratapvardhan

Note that installing from the repo works:

git clone git://github.com/sightmachine/SimpleCV.git
cd SimpleCV
python setup.py install

# svgwrite also needs to be installed
pip install -r requirements.txt

It's pip install SimpleCV that is causing problems.

erikcw avatar Dec 10 '14 00:12 erikcw

There should be a new release add a MANIFEST.ini or easier add setuptool-git to your env where you say python sdist upload

delijati avatar Jun 19 '15 07:06 delijati