码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-06-30 14:25:20      阅读:814      评论:0      收藏:0      [点我收藏+]

标签:dpkg   comm   res   director   解决   info   close   develop   and   

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安装)

标签:dpkg   comm   res   director   解决   info   close   develop   and   

原文地址:https://www.cnblogs.com/shuimuqingyang/p/11109400.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!