问题1:win10系统下在anaconda软件中打不开jupyter notebook
解决办法:尝试更改了防火墙权限还是不能实现自动打开浏览器功能,所以采用anaconda prompt打开jupyter notebook,
(1)在开始菜单找到anaconda prompt软件,并打开
(2)环境默认使用的是base,需要转换软件环境,我的环境名称为tensor37,因此键入:acativate tensor37
退出环境使用:deactivate
(3)键入jupyter notebook 即可打开notebook
或着采用如下方法:
控制面板-windows防火墙-允许程序或功能通过windows防火墙-允许运行另一程序-浏览-定位到Anaconda安装目录,选中python.exe,打开-添加-确定。同理把pythonw.exe也添加进去,这样jupyter notebook就可以打开了。
问题2: 在notebook中打开tab键代码提示功能
解决办法:Jupyter notebook使用默认的自动补全是关掉的。要打开自动补全,需修改默认配置。
(1)在prompt中键入:
ipython profile create
(2)以上命令会在~/.ipython/profile_default/
目录下生成ipython_config.py
和ipython_kernel_config.py
在ipython_config.py中修改代码为
## Activate greedy completion PENDING DEPRECTION. this is now mostly taken care
# of with Jedi.
#
# This will enable completion on elements of lists, results of function calls,
# etc., but can be unsafe because the code is actually evaluated on TAB.
c.Completer.greedy = True
## Experimental: restrict time (in milliseconds) during which Jedi can compute
# types. Set to 0 to stop computing types. Non-zero value lower than 100ms may
# hurt performance by preventing jedi to build its cache.
c.Completer.jedi_compute_type_timeout = 400
## Experimental: Use Jedi to generate autocompletions. Off by default.
c.Completer.use_jedi = True
(3)重启prompt,打开notebook即可
问题3:在anaconda中的notebook中出现导入cv2模块失败
解决办法:
1.在prompt中切换到tensor37环境中 acativate tensor37
2.更新opencv模块,pip install opencv-python 即可完成