How to download and run multiple opencv versions on pc

Hi, I currently have opencv4 on my pc. However, the program I am running only works for opencv3. I downloaded opencv3 using pip install on the command prompt of my pc. However, I do not know how to make opencv3 my default version when I run my python program. Thank you!

venv and virtualenv is the usual solution for this.

modules are installed into such an environment rather than system-wide.

this isn’t specific to OpenCV but to Python. you’ll find information on the internet.