Ask Your Question
0

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 tests.py 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/loader.py", line 390, in loadTestsFromName addr.filename, addr.module)
File "/usr/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath return self.importFromDir(dirpath, fqname)
File "/usr/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir mod = load
module(part_fqname, fh, filename, desc)
File "~/SimpleCV/SimpleCV-src/SimpleCV/init.py", line 3, in <module> from SimpleCV.base import *
File "~/SimpleCV/SimpleCV-src/SimpleCV/base.py", line 21, in <module> import pygame as pg
ImportError: No module named pygame

I checked if i have installed it using
pip install pygame
Output:
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
0

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:

https://github.com/ingenuitas/SimpleCV/blob/develop/scripts/virtualenv-bootstrap.sh

edit flag offensive delete link more
0

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.
http://stackoverflow.com/questions/5842235/linux-videodev-h-no-such-file-or-directory-opencv-on-ubuntu-11-04

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

Stats

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

Seen: 437 times

Last updated: Apr 08 '13