网上教程较多这里不再赘述
跳转到目录(cd /etc/apt)
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
需要修改Linux下(~/.pip/pip.conf)文件,没有就
新建一个文件夹(文件夹名字前要加“.”,表示隐藏文件夹) 和文件
mkdir ~/.pip
sudo vi ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
用:w !sudo tee % 保存
用:q!退出
sudo apt-get install nano
sudo apt-get install python3-pip python3-dev
python3 -m pip install --upgrade pip
sudo nano /usr/bin/pip3
from pip import main
if __name__ == '__main__':
sys.exit(main())
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())
pip3 -V
sudo nano ~/.bashrc
export CUBA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda/bin:$PATH
source ~/.bashrc
sudo pip3 install -U pip testresources setuptools
sudo pip3 install -U pip testresources setuptools
sudo apt-get update
sudo apt-get autoremove
sudo apt-get install python3-pip libhdf5-serial-dev hdf5-tools
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/vxx tensorflow --timeout=120
xx为jetson nano 系统的版本
附:官网简易安装教程https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html
cd ~/Downloads/
nano pyTest.py
import tensorflow as tf
print('GPU', tf.test.is_gpu_available())
a = tf.constant(2.0)
b = tf.constant(4.0)
print(a + b)
python3 pyTest.py
1.系统缺少JDK组件。参考文章https://blog.csdn.net/m0_37167788/article/details/88947957
(1)下载地址:https://www.oracle.com/downloads/ 选Java (JDK) for Developers-》JDK Download
(2)建议下载8或者11版本,最新的15好像不兼容
(3)通过tar -zxvf 命令进行解压
(4)通过sudo mkdir /usr/lib/jdk 建立一个文件夹 (因为权限不够,所以加了sudo)
mv jdk1.8.0_111 /usr/lib/jdk
jdk1.8.0_111为解压后的文件夹名字
(5)设置环境变量 修改全局配置文件,作用于所有用户:vim /etc/profile
用“a” 命令插入
export JAVA_HOME=/usr/lib/jdk/jdk1.8.0_111
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=.:${JAVA_HOME}/bin:$PATH
用:w !sudo tee % 保存
用:q!退出
用 source /etc/profile 命令激活一下
检查是否安装成功:java -version
(6)sudo apt-get install default-jdk 安装一些文件
sh ./pycharm.sh
这里不对如何注册或获得激活码做解释
cd /usr/share/applications
sudo gedit pycharm.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Pycharm
Icon=软件地址/bin/pycharm.png
Exec=sh 软件地址/bin/pycharm.sh
MimeType=application/x-py;
Name[en_US]=pycharm
注意修改“软件地址”
sudo chown 用户名 文件名.desktop //修改文件的所属权限
例如 sudo chown user pycharm.desktop
cp 文件名.desktop /home/用户名/Desktop
例如 cp pycharm.desktop /home/用户名/Desktop/
引用
https://blog.csdn.net/qq_16069457/article/details/108424902
https://blog.csdn.net/qq_40672851/article/details/107202525
https://blog.csdn.net/qq_15192373/article/details/81091278
https://blog.csdn.net/jianming21/article/details/89716245