sudo yum -y install epel-release sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel # use pip or pip3 as you prefer for python or python3 pip install --upgrade virtualenv virtualenv --system-site-packages ~/venvs/tensorflow source ~/venvs/tensorflow/bin/activate pip install --upgrade numpy scipy wheel cryptography #optional # ref https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package pip install --upgrade https://download.tensorflow.google.cn/linux/cpu/tensorflow-1.8.0-cp27-none-linux_x86_64.whl # or below if you want gpu, support, but cuda and cudnn are required, see docs for more install instructions #pip install --upgrade https://download.tensorflow.google.cn/linux/gpu/tensorflow_gpu-1.8.0-cp27-none-linux_x86_64.whl
pip install jupyter pip install ipykernel python -m ipykernel install --user --name tensorflow --display-name "py27(tensorflow)"
jupyter notebook默認不支持遠程訪問。配置遠程訪問的方法以下:python
1.生成配置文件:jupyter notebook --generate-config
2.生成密碼:進入python終端
linux
>>>from Ipython.lib import passwd >>>passwd() Enterpassword: Verify password: 'sha1:1d68765c0816:e4688c38af42ecb3b42c075543ffdf2ca4c7d248'
3.修改配置文件c++
/home/用戶名/.jupyter/jupyter_notebook_config.pybash
c.NotebookApp.ip='0.0.0.0' c.NotebookApp.password = u'sha:ce...剛纔複製的那個密文' c.NotebookApp.open_browser = False c.NotebookApp.port =8888 #隨便指定一個端口
注意:socket
網上有不少教程把ip設置爲 c.NotebookApp.ip='*'ui
這樣會報錯 socket.gaierror: [Errno -2] Name or service not knowngoogle
4. 啓動jupyter。url
jupyter notebookspa
1. error: open of epel-release failed: No such file or directoryblog
安裝:sudo rpm -vih http://mirrors.aliyun.com/epel//epel-release-latest-7.noarch.rpm
提示以下:
Retrieving http://mirrors.aliyun.com/epel//epel-release-latest-7.noarch.rpm warning: /var/tmp/rpm-tmp.uldNEC: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY warning: Unable to get systemd shutdown inhibition lock: Unit is masked. Preparing... ################################# [100%] file /etc/yum.repos.d/epel-testing.repo from install of epel-release-7-11.noarch conflicts with file from package epel-release-7-9.noarch file /etc/yum.repos.d/epel.repo from install of epel-release-7-11.noarch conflicts with file from package epel-release-7-9.noarch
更新源:yum clean all && yum makecache