'Add non-Pip packages to Pip

I built OpenCV from source via this script.

Since it's not installed using Pip, $ pip list doesn't have opencv-python.

$ pip list

...
MarkupSafe (1.0)
matplotlib (2.1.1)
numpy (1.13.3)
oauth (1.0.1)
oauthlib (2.0.6)
# opencv-python not available
onboard (1.4.1)
PAM (0.4.2)
pandas (0.22.0)
...

The problem is, when I want to create a virtualenv, OpenCV is not included.

How can I include non-Pip packages, OpenCV in this case, to my Pip list?



Solution 1:[1]

Thank you @flakes for advice!

I was able to import OpenCV with new virtualenv using below command.

$ python3 -m venv --system-site-packages ENV

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 WhaSukGO