TX2安装配置keras环境

1.安装pip
apt install python3-pip
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
sudo apt install python3-pip
安装成功, 使用pip3 list
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
pip3 install --upgrade pip
Traceback (most recent call last):
File “/usr/bin/pip3”, line 9, in
from pip import main
ImportError: cannot import name ‘main’
解决方法:

				将 /usr/bin/pip 文件中:

				from pip import  main
				if __name__ == '__main__':
				    sys.exit(main())

				改为:

				from pip import __main__
				if __name__ == '__main__':
				    sys.exit(__main__._main())
  1. 安装各种配置
    sudo pip3 install numpy
    sudo pip3 install scipy

     python3 -m pip install scipy
     #pip3 install scikit-learn
     sudo pip3 install pillow
     sudo pip3 install h5py
     sudo pip3 install matplotlib
     
     #pip3 install tensorflow
     参考: https://www.jianshu.com/p/56c85e29523d
     		https://developer.nvidia.com/embedded/downloads
     sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp33 tensorflow-gpu
     sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp33 tensorflow-gpu
     
     sudo pip3 install keras
     
     sudo pip3 install Flask
     sudo pip3 install Flask-RESTful
    

    scipy安装:
    Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-lxaghvd9/scipy/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-record-rrpjpoly/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-lxaghvd9/scipy/
    需要更新setuptools
    越过pip安装
    #sudo apt-get install python3-scipy

    h5py安装:
    Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-clhvns2m/h5py/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-record-hu823puj/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-clhvns2m/h5py/

     sudo apt-get install python3-h5py
    

    matplotlib安装:
    Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-lva84fcd/matplotlib/
    #sudo apt-get install python3-matplotlib

    setuptools 20.7.0 更新
    sudo pip3 install setuptools==40.5.0

  2. 不能定位(cannot locate xxx)到软件源的解决方法,执行以下2个命令
    sudo apt-key update
    sudo apt-get update

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值