keras安装过程的总结
-
下载安装anaconda
-
D盘建立环境:我的虚拟环境:py3.7(3.7.11)
- conda create -n name
-
jupter notebook:安装与使用
远程访问配置
-
jupyter notebook --generate-config -
执行成功后:会出现
Writing default config to: /root/.jupyter/jupyter_notebook_config.py -
生成密码:
jupyter notebook password,生成的密码存储在jupyter_notebook_config.json。 -
修改配置文件:找到当前用户:
~\\.jupyter\jupyter_notebook_config.py
修改对应内容:c.NotebookApp.ip = '192.168.43.31'c.NotebookApp.open_browser = Falsec.NotebookApp.password = u'sha1:2c0a4092ad6d:174e7c4544aba4d4c5366a9466a7ea3232935b42'对应json文件中的,实际上是123456c.NotebookApp.port = 8888
-
在浏览器输入ip:端口即可访问(密码为生成密码时输入的)
此次设计好之后,下次命令行输入jupyter notebook,连接的网络不一样,ip不一样,会报错
输入jupyter notebook --generate-config会重置设置
-
-
安装需要的包
问题解决经验总结:
-
jupyter notebook kernel error
- pywin32卸载安装对应版本:3.7》227
-
tensorflow与keras与python版本要对应
- 2.2.0》2.3.1》3.7
-
国内镜像源pip安装 -i
(1)阿里云 http://mirrors.aliyun.com/pypi/simple/
(2)豆瓣http://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
(5)华中科技大学http://pypi.hustunique.com/ -
在虚拟环境中conda install nb_conda后可以在虚拟环境中jupyter notebook从而使用虚拟环境的python
如果你安装的是 tensorflow 2.x 你可以在导入 tensorflow 时使用 import
tensorflow.compat.v1 as tf # 导入 1.x 版本的 tensorflow import numpy as nptf.disable_v2_behavior() # 停止使用 2.x 版本的 tensorflow 行为
强制使用 1.x 版本的 tensorflow

3万+

被折叠的 条评论
为什么被折叠?



