Package installation for ‘Computer Vision Workshop’ at December PythonPune Meetup

For December PythonPune meetup workshop following libraries are required:
opencv
numpy
matplotlib
ipython
mpldatacursor

Its quite hectic to install these libraries, so here are steps to install them on Fedora and Ubuntu.

Fedora

Install dependencies

$ sudo dnf -y install python-devel gcc-c++ rpm-build

Install virtualenv, create new virtual environment and activate it

$ sudo pip install virtualenv
$ virtualenv venv
$ . venv/bin/activate

Install ipython and numpy

(venv)$ pip install ipython
(venv)$ pip install numpy

Install matplotlib & mpldatacursor

$ su -c "dnf builddep python-matplotlib"
(venv)$ git clone git://github.com/matplotlib/matplotlib.git
(venv)$ cd matplotlib/
(venv)$ python setup.py install
(venv)$ pip install mpldatacursor

Install opencv

$ sudo dnf -y install opencv*
$ cp /usr/lib64/python2.7/site-packages/cv* ~/venv/lib/python2.7/site-packages/

 

Ubuntu

Install dependencies

$ sudo apt-get install python-dev

Install virtualenv, create new virtual environment and activate it

$ sudo pip install virtualenv
$ virtualenv venv
$ . venv/bin/activate

Install ipython and numpy

(venv)$ pip install ipython
(venv)$ pip install numpy

Install matplotlib & mpldatacursor

$ sudo apt-get build-dep python-matplotlib
(venv)$ git clone git://github.com/matplotlib/matplotlib.git
(venv)$ cd matplotlib/
(venv)$ python setup.py install
(venv)$ pip install mpldatacursor

Install opencv

$ sudo apt-get install libopencv-dev python-opencv
$ cp /usr/lib/python2.7/dist-packages/cv* ~/venv/lib/python2.7/site-packages/

For more info on installing matplotlib see here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s