【问题标题】:Tensorflow, TRT models installation problemTensorflow、TRT模型安装问题
【发布时间】:2020-08-03 18:35:01
【问题描述】:

我按照here 的说明在 Jetson-nano 上安装了tf_trt_models。我收到以下错误

Installed /home/tarik-dev/.local/lib/python3.6/site-packages/slim-0.1-py3.6.egg
Processing dependencies for slim==0.1
Finished processing dependencies for slim==0.1
~/tf_trt_models
Installing tf_trt_models
/home/tarik-dev/tf_trt_models
running install
Checking .pth file support in /home/tarik-dev/.local/lib/python3.6/site-packages/
/home/tarik-dev/.virtualenvs/nanocv/bin/python -E -c pass
TEST FAILED: /home/tarik-dev/.local/lib/python3.6/site-packages/ does NOT support .pth files
bad install directory or PYTHONPATH

【问题讨论】:

  • 我不确定我是否走在正确的道路上,但这是我基于此https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html 的怀疑,我阅读了 公共 Python 3 模块必须安装在系统 Python 3 模块目录中, /usr/lib/python3/dist-packages.

标签: tensorflow tensorrt nvidia-jetson-nano


【解决方案1】:

找到了解决办法。在安装脚本中,因为我在 virtualenv 中,所以我需要删除 --user 这是 install.sh 脚本

#!/bin/bash

INSTALL_PROTOC=$PWD/scripts/install_protoc.sh
MODELS_DIR=$PWD/third_party/models

PYTHON=python

if [ $# -eq 1 ]; then
  PYTHON=$1
fi

echo $PYTHON

# install protoc
echo "Downloading protoc"
source $INSTALL_PROTOC
PROTOC=$PWD/data/protoc/bin/protoc

# install tensorflow models
git submodule update --init

pushd $MODELS_DIR/research
echo $PWD
echo "Installing object detection library"
echo $PROTOC
$PROTOC object_detection/protos/*.proto --python_out=.
$PYTHON setup.py install --user
popd

pushd $MODELS_DIR/research/slim
echo $PWD
echo "Installing slim library"
$PYTHON setup.py install --user
popd

echo "Installing tf_trt_models"
echo $PWD
$PYTHON setup.py install --user

【讨论】:

  • 接受您的回答,将您的问题标记为已解决。
  • 以 sed 命令形式:sed -i 's/$PYTHON setup.py install --user/$PYTHON setup.py install/g' install.sh
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-12
  • 2017-05-30
  • 2022-10-06
  • 2018-01-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多