https://blog.csdn.net/u010899985/article/details/59482825php
https://blog.csdn.net/fdqw_sph/article/details/78745375python
http://www.javashuo.com/article/p-umijoiiw-nq.htmllinux
https://blog.csdn.net/zafir_410/article/details/73188228?utm_source=itdadao&utm_medium=referraljson
https://blog.csdn.net/AllenIrving/article/details/80406709ubuntu
问题总结:api
Q1:我在安装anaconda过程当中,直接跳过了PATH的安装以下图:bash
遇到这种状况只能本身添加了:框架
一、到根目录下,打开终端并输入:学习
sudo gedit ~/.bashrc
二、在.bashrc文件末尾添加的路径: 测试
#export PATH=/home/xxx/anaconda3/bin:$PATH
保存并关闭文件
三、使其当即生效,在终端执行:
source ~/.bashrc
四、测试anaconda安装成功:
anaconda -V
五、打开anaconda-navigator
$ anaconda-navigator
Q2: 安装Anaconda后,须要安装Tensorflow出现问题:
conda create -n tensorflow python=3.6 #我下的TensorFlow对应的Python是3.6版本,那么我就使用这行
错误信息:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2>
Elapsed: -
解决办法:
sudo gedit ~/.condarc
删除文件中 -defaults那一行便可。
Anaconda使用:
激活和关闭环境:
source activate tensorflow #激活环境(这里tensorflow 是你本身的环境名称) source deactivate tensorflow #关闭环境
调用激活后环境中的jupyter notebook(必定要给激活环境安装jupyter notebook)
$ ipython notebook
修改jupyter的目录:
jupyter notebook --generate-config
安装Tensorflow:
一、换源(若是出现URL错误的话)
二、安装Tensorflow-gpu
conda install tensorflow-gpu
若是失败试试:
pip install tensorflow-gpu
若是pip3 install --upgrade tensorflow-gpu失败的话,先安装pip
sudo apt install python3-pip
或者:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.8.0-cp36-cp36m-linux_x86_64.whl
安装keras:(若是须要)
pip install keras
三、测试Tensorflow
import tensorflow as tf a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') c = tf.matmul(a, b) sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) print(sess.run(c))
四、查看Tensorflow版本号
python import tensorflow as tf tf.__version__
或者:
anaconda search -t conda tensorflow
Ubuntu关机重启命令简介:
重启命令:
一、reboot
二、shutdown -r now 马上重启(root用户使用)
三、shutdown -r 10 过10分钟自动重启(root用户使用)
四、shutdown -r 20:35 在时间为20:35时候重启(root用户使用)
若是ubantu分区根目录空间过小,能够经过挂载方式解决: