sightmachine/SimpleCV

Mac OS import SimpleCV failed

harryprince opened this issue · 2 comments

import SimpleCV
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "SimpleCV/__init__.py", line 3, in <module>
    from SimpleCV.base import *
  File "SimpleCV/base.py", line 21, in <module>
    import pygame as pg
ImportError: No module named pygame

My mac version is 10.10.2(yosemite)
Python 2.7

sudo pip install -r requirements.txt

when I run the code like above,the error turns out.

The directory '/Users/harryzhu/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/harryzhu/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/harryzhu/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): SimpleCV in /Users/harryzhu/anaconda/lib/python2.7/site-packages/SimpleCV-1.3-py2.7.egg (from -r requirements.txt (line 1))
Collecting pygame>=1.9.1 (from -r requirements.txt (line 3))
  Could not find a version that satisfies the requirement pygame>=1.9.1 (from -r requirements.txt (line 3)) (from versions: )
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow).
  No matching distribution found for pygame>=1.9.1 (from -r requirements.txt (line 3))

I hit the same error installing in an Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-61-generic x86_64) VM, so not only an OS X issue. It'd be interesting to understand better why this is a required dependency, but I don't have the time to dig.