1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Linux安装anaconda3 配置jupyter 在jupyter安装tensorflow环境

Linux安装anaconda3 配置jupyter 在jupyter安装tensorflow环境

时间:2020-01-12 20:31:53

相关推荐

Linux安装anaconda3 配置jupyter 在jupyter安装tensorflow环境

一、安装anaconda3

1.1、资源包下载/archive/

或者在服务下载 wget /archive/Anaconda3-.02-Linux-x86_64.sh

1.2、执行

chmod +xAnaconda3-.02-Linux-x86_64.sh

1.3、执行

bashAnaconda3-.02-Linux-x86_64.sh

根据提示输入yes

1.4确认是否安装成功:

conda --version

4.8.2

列出当前环境conda env list创建虚拟环境conda create -n py37_tf2 python=3.7激活环境source activate py37_tf2

二、配置jupyter

进入 ipython

(py37_tf2) [root@emr-worker-1 jupyter]# jupyter notebook --generate-configWriting default config to: /root/.jupyter/jupyter_notebook_config.py(py37_tf2) [root@emr-worker-1 jupyter]# vim /root/.jupyter/jupyter_notebook_config.py(py37_tf2) [root@emr-worker-1 jupyter]# ipythonPython 3.7.6 (default, Jan 8 , 19:59:22)Type 'copyright', 'credits' or 'license' for more informationIPython 7.12.0 -- An enhanced Interactive Python. Type '?' for help.In [1]: from notebook.auth import passwdIn [2]: passwd()Enter password:Verify password:Out[2]: 'sha1:d65b8dxxxIn [3]:exit()退出ipython环境进入/mnt/disk1/apps/anaconda3/etc/jupyter执行jupyter notebook --generate-config(py37_tf2) [root@emr-header-1 jupyter]# jupyter notebook --generate-configOverwrite /root/.jupyter/jupyter_notebook_config.py with default config? [y/N]yWriting default config to: /root/.jupyter/jupyter_notebook_config.py(py37_tf2) [root@emr-header-1 jupyter]#vim /root/.jupyter/jupyter_notebook_config.pyc

c.NotebookApp.ip = '*' # 允许访问此服务器的 IP,星号表示任意 IPc.NotebookApp.password = u'sha1:d65b8dxxx' # 之前生成的密码 hash 字串c.NotebookApp.open_browser = False # 运行时不打开本机浏览器c.NotebookApp.port = 6000 # 使用的端口,随意设置c.NotebookApp.enable_mathjax = True # 启用 MathJax

前台启动

jupyter notebook

root用户启动

nohup jupyter notebook --allow-root &

三、安装tensorflow==2.2

进入jupter页面执行 http://localhost:6000

pip install tensorflow==2.2

参考:【1】/andylhc/p/9513504.html

【2】/dongwanli666/article/details/7899

【3】/cord/p/9226641.html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。