X2安装配置keras环境(包含matplotlib安装)

Posted shuimuqingyang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了X2安装配置keras环境(包含matplotlib安装)相关的知识,希望对你有一定的参考价值。

https://blog.csdn.net/jonado13/article/details/83933453

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
2
3
4
5
6
7
8
9
10
11
安装各种配置
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
1
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

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


初学JetsonTX2之安装Tensorflow-gpu、keras
阅读数 1256

本文参考:https://blog.csdn.net/dhaduce/article/details/80155121https://www.jianshu.com/p/56c85e29523d关于T...
博文
来自: alphonse2017的博客
Jetson TX2 tensorflow安装+keras安装
---------------------
作者:jonado13
来源:CSDN
原文:https://blog.csdn.net/jonado13/article/details/83933453
版权声明:本文为博主原创文章,转载请附上博文链接!

以上是关于X2安装配置keras环境(包含matplotlib安装)的主要内容,如果未能解决你的问题,请参考以下文章

大数据开发keras框架环境配置小结

keras在win7下环境搭建

keras-gpu的安装与配置

[Python人工智能] 三十九.VS Code配置Python编程和Keras环境及手写数字识别(基础篇)

[Python人工智能] 三十九.VS Code配置Python编程和Keras环境及手写数字识别(基础篇)

keras安装及使用