Help us understand the problem. What is going on with this article?

Jetson Xavier の Python3 から OpenCV3(cv2.so) をインポートする

More than 1 year has passed since last update.

JetPack 4.0でOpenCV 3.3.1をXavierにインストールするとPython3からcv2ライブラリをインポートできません。
Jetson TX1, TX2 ではOpenCVをソースからビルドする必要がありました。
しかし今回はPython3対応の /usr/lib/python3.6/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so がありました。
そこでPython3仮想環境からシンボリックリンクをはることにしました。
virtualenv で構築した仮想環境(ex. ~/virtualenv/tensorflow ディレクトリ)からインポートしたいときは

$ cd ~/virtualenv/tensorflow/lib/python3.6/site-packages
$ ln -s /usr/lib/python3.6/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so cv2.so
$ source ~/virtualenv/tensorflow/bin/activate
$ python

```python
>>> import cv2
>>> cv2.__version__
'3.3.1'
>>>

Xavier JetPack4.0 に対応した TensorFlow whlファイルは Nvidia Forum のこちら

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした