OpenCV-Python Installation

We recommend using Anaconda with Python 3 for the homework assignments. The instruction to install anaconda and Python 3 can be found at http://docs.anaconda.com/anaconda/install/linux/. Below is a short tutorial to install the experiment system on the PSU Linux lab machines and on a regular Windows machine. Note, we highly recommend that the homework assignments are completed on a Linux machine and will grade your assignments on Linux only.

Linux: 

1. Install anaconda: 

wget https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh
bash Anaconda3-2018.12-Linux-x86_64.sh -b -p $HOME/anaconda
export PATH="$HOME/anaconda/bin:$PATH"
conda update --all

2. Install necessary libraries: 

pip install opencv-python==3.4.2.17
pip install opencv-contrib-python==3.4.2.17

Windows: 


1. Download and install anaconda environment Python 3.7:
Download: https://www.anaconda.com/download/#windows
Install: http://docs.anaconda.com/anaconda/install/windows/

Download Anaconda

2. Open Anaconda Prompt
Start Menu / Anaconda3 / Anaconda Prompt

Anaconda Prompt

3. In Anaconda Prompt, type commands to install necessary libraries:

pip install opencv-python==3.4.2.17
pip install opencv-contrib-python==3.4.2.17

Install libraries


4. Run your python program

Run python program