You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for providing these scripts. I was able to complete the build/installation of OpenCV v4.0 today using the Jetson Nano script. However, the Python bindings accessible by the base Python installations appear to reference a previous version (3.2) rather than the OpenCV version (4.0) installed by the script from this repository:
$ python
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.2.0'
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.2.0'
When I launch a virtual environment the OpenCV bindings aren't present at all, and I can't seem to install them via pip:
$ workon cvtest
(cvtest) $ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
>>>
(cvtest) $ pip install opencv-python
Collecting opencv-python
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python
The bindings are installed (I think) by the final line of the script:
However, it appears that the bindings that are installed by the commands above are for version 3.2 and bear no relation to those we built with the script from this repository:
Add the OpenCV Python bindings into the virtual environment by creating a link to the OpenCV Python module within the virtual environment's site-packages directory. For example if the OpenCV module was built and installed as /usr/local/python/cv2/python-3.6/cv2.cpython-36m-aarch64-linux-gnu.so and the virtual environment is named nano then we'll create the link like so:
Rather than doing this for the individual virtual environments we can create a link to the OpenCV Python bindings within /usr/lib/python3.6 which seems to be included in the PYTHONPATH of all virtual environments:
At this point we should see the OpenCV bindings with the correct version available to the Python virtual environment:
$ workon nano
(nano) $ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.0.0'
Is this something that should be addressed within this script, and/or does it indicate something missing from the script itself? Or am I the only one who has run across this issue?
It seems the script reinstalled python-opencv v3.2 unintendedly. Replacing sudo apt-get install -y python-opencv python3-opencv with sudo ldconfig will resolve the issue.
Thanks for providing these scripts. I was able to complete the build/installation of OpenCV v4.0 today using the Jetson Nano script. However, the Python bindings accessible by the base Python installations appear to reference a previous version (3.2) rather than the OpenCV version (4.0) installed by the script from this repository:
When I launch a virtual environment the OpenCV bindings aren't present at all, and I can't seem to install them via
pip
:The bindings are installed (I think) by the final line of the script:
However, it appears that the bindings that are installed by the commands above are for version 3.2 and bear no relation to those we built with the script from this repository:
Can anyone advise? Thanks in advance for any help. BTW I'm new at this, my apologies for dumb/naive questions...
The text was updated successfully, but these errors were encountered: