Ask Your Question

Tests fail in virtualenv (dependency hell)

asked 2013-04-05 14:36:04 -0500

MhAckNI gravatar image

I have installed SimpleCV and use python from a virtualenv environment. It resides in ~/.virtualenvs/VirtEnv4SimpleCV/

I installed nosetests using
pip install nose
I wanted to run the tests.
So I change to the ~/SimpleCV/SimpleCV-src/SimpleCV/tests folder. nosetests And it fails now with

ERROR: Failure: ImportError (No module named pygame)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/", line 390, in loadTestsFromName addr.filename, addr.module)
File "/usr/lib/python2.7/site-packages/nose/", line 39, in importFromPath return self.importFromDir(dirpath, fqname)
File "/usr/lib/python2.7/site-packages/nose/", line 86, in importFromDir mod = load
module(part_fqname, fh, filename, desc)
File "~/SimpleCV/SimpleCV-src/SimpleCV/", line 3, in <module> from SimpleCV.base import *
File "~/SimpleCV/SimpleCV-src/SimpleCV/", line 21, in <module> import pygame as pg
ImportError: No module named pygame

I checked if i have installed it using
pip install pygame
Requirement already satisfied (use --upgrade to upgrade): pygame in ~/.virtualenvs/VirtEnv4SimpleCV/lib/python2.7/site-packages Cleaning up...

python -c "import pygame" however does not return any errors

Absolutely strange. Do any of you use this kind of setup. Am i getting something wrong here in using pip install for example?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-04-08 20:57:37 -0500

xamox gravatar image

There is a script in the scripts folder that should setup SimpleCV inside a virtualenv for you:

edit flag offensive delete link more

answered 2013-04-06 05:04:06 -0500

MhAckNI gravatar image

ok. I solved it myself. I uninstalled pygame and then tried to reinstall it. There was an issue with a header file that pygame attempted to link to. I solved it by creating a symbolic link to the missing header file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-04-05 14:36:04 -0500

Seen: 437 times

Last updated: Apr 08 '13