From the course: Introduction to Deep Learning with OpenCV

Create a virtual environment

- So with Python and conda installed, let's create a virtual environment. Virtual environments are a great way to separate out your different Python projects, especially if they have different versions of Python installed, with different modules and packages. So let's create our virtual environment and let's give it the name open cv four, so that's ocv4, so, conda create --name ocv4 and python equals 3.6, type yes to install all of the relevant packages. And let me just clear the screen so that you can see the entire screen. Now in Windows after you create a virtual environment, you need to activate in order to use it. So let's type, activate ocv4, and let's install cmake, numpy and opencv. So pip, install cmake. Now let's install numpy, so pip install numpy. And let me just go ahead and clear the screen. And now pip, install opencv-contrib-python== and we're going to install version 4.0.1.24. And now let's go ahead and install dlib so conda install -c conda-forge dlib. Select yes to install the new packages. Let me just go ahead and clear the screen. Now let's just check that the modules have been installed as expected. So type python and now let's go ahead and import numpy. So import numpy. Let's go ahead and import opencv. So that's import cv2. So that's worked and so we've confirmed that we've been able to import numpy and opencv. In the next video, we'll go ahead and install a text editor.

Contents