Open oscargicast opened 10 years ago
I think you need to install the python binding of opencv
$ aptitude search python | grep opencv
p python-opencv - Python bindings for the computer vision li
v python2.7-opencv -
Hi @mylxiaoyi . I already have python-opencv installed.
$ apt-cache search python | grep opencv
python-opencv - Python bindings for the computer vision library
In my computer, there are two file cv.py
and cv2.so
in /usr/local/lib/python2.7/dist-packages
, do you have the files in the same place or in other places of your computer?
If you do have the files in other places, maybe you need to add the path where the two files exist in to your python path.
Good Luck!!
Thanks @mylxiaoyi for the help. The two files, cv.py
and cv2.so
are located in this path, I am using ubuntu 14.04:
/usr/lib/python2.7/dist-packages/
Besides, I am using virtualenvwrapper, so I linked these file to ~/.viertualenvs/**simplecv_env**/lib/python2.7/site-packages/
and ~/.viertualenvs/**simplecv_env**/local/lib/python2.7/site-packages/
, inside my virtualenv.
That's what I have inside this path:
$ oscar@oscar ~WORKON_HOME/simplecv/lib/python2.7/site-packages ls
cv2.so pkg_resources.py
cv.py pkg_resources.pyc
easy-install.pth pygame
easy_install.py pygame-1.9.1release-py2.7.egg-info
easy_install.pyc pyparsing-2.0.2-py2.7.egg-info
IPython pyparsing.py
ipython-2.1.0.dist-info pyparsing.pyc
_markerlib scipy
numpy scipy-0.14.0-py2.7.egg-info
numpy-1.8.1-py2.7.egg-info setuptools
PIL setuptools-3.6.dist-info
Pillow-2.4.0-py2.7.egg-info SimpleCV-1.3-py2.7.egg
pip svgwrite
pip-1.5.6.dist-info svgwrite-1.1.6-py2.7.egg-info
$ oscar@oscar ~WORKON_HOME/simplecv/lib/python2.7/site-packages pwd
/home/oscar/.virtualenvs/simplecv/lib/python2.7/site-packages
The same for ~/.viertualenvs/simplecv/local/lib/python2.7/site-packages/
, just in case.
P.S. I can run SimpleCV globally without using virtualenv.
I've created a virtualenv and install almost all the requirements via pip, but PIL. So I installed Pillow instead of this one.
Then, when I want to import SimpleCV I get this.
Apparently I don't have installed cv(2)
This is the output when I installed SimpleCV doing this:
I would like to install SimpleCV inside a virtualenv. Thank you all your help.