LoginSignup
1
1

More than 1 year has passed since last update.

JETSON AGX ORINにtensorflowをインストールする

Posted at

JETSON AGX ORINのセットアップについて

JETSONT AGX ORINを使用するにはまずJETPACKをセットアップする必要があります。

JETPACKのセットアップ方法

この作業が完了の後にtensorflowをインストールします。

tensorflowのインストール方法

通常のUbuntuと異なるインストール方法になります。NVIDIA公式サイトを参考にします。

bash
sudo apt-get update
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran

sudo apt-get install python3-pip
sudo pip3 install -U pip testresources setuptools==49.6.0 

sudo pip3 install -U --no-deps numpy==1.19.4 future==0.18.2 mock==3.0.5 keras_preprocessing==1.1.2 keras_applications==1.0.8 gast==0.4.0 protobuf pybind11 cython pkgconfig packaging
sudo env H5PY_SETUP_REQUIRES=0 pip3 install -U h5py==3.1.0
#h5pyのインストールには時間がかかります

#tensorflow2の最新版をインストールします。JETPACK OSに最適化された環境ですので、古いバージョンが指定できません。

sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v50 tensorflow

これでtensorflowがインストールできたはずですが、import tensorflowを行うと下記エラーが出現しました。

python3

usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/__init__.py:98: UserWarning: unable to load libtensorflow_io_plugins.so: unable to open file: libtensorflow_io_plugins.so, from paths: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so']
caused by: ["[Errno 2] The file to load file system plugin from does not exist.: '/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so'"]
  warnings.warn(f"unable to load libtensorflow_io_plugins.so: {e}")
/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/__init__.py:104: UserWarning: file system plugins are not loaded: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.8/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: cannot open shared object file: No such file or directory']
  warnings.warn(f"file system plugins are not loaded: {e}")

どうやらtensorflow_ioが見つからないエラーですのでインストールしてみます。

bash
pip3 install tensorflow_io

これで解決したようで、無事にtensorflowをimport できました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1