安装并运行jupyter notebook出现的各种bug及安装方法!

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/jiao_mrswang/article/details/83183550

windows默认编码:gbk

ubuntu默认编码:utf-8

二 

安装jupyter notebook的核心命令:

sudo python3 -m pip install --upgrade pip

sudo python3 -m pip install jupyter

备注:必须要求是python3进行安装,否则会报编码错误,如下所示:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range (128)

如果python3安装jupyter notebook报如下错误:

/usr/bin/pip3:No module named pip

上述错误由于没有装pip3导致。

你要安装的是python3-pip
linux下直接使用sudo apt-get install python3-pip

参考文章:https://blog.csdn.net/kansas_jason/article/details/82834409

si 

xinlingshou1@hjimi:~$ sudo pip3 install --upgrade pip
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
 

https://blog.csdn.net/zong596568821xp/article/details/80410416

 

展开阅读全文

运行jupyter notebook 出现如下报错

12-05

环境 anaconda2 tensorflow1.10.1 python2.7 jupyter notebook 4.2.1rn报错如下:rn Kernel started: 3ffc7b27-5215-4d1c-b6c2-3c4236ba7789rnTraceback (most recent call last):rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/runpy.py", line 174, in _run_module_as_mainrn "__main__", fname, loader, pkg_name)rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/runpy.py", line 72, in _run_codern exec code in run_globalsrn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in rn app.launch_new_instance()rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instancern app.initialize(argv)rn File "", line 2, in initializern File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_errorrn return method(app, *args, **kwargs)rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 469, in initializern self.init_sockets()rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 260, in init_socketsrn self.init_iopub(context)rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 268, in init_iopubrn self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True)rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/ipykernel/iostream.py", line 66, in __init__rn self.io_loop = IOLoop(make_current=False)rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tornado/util.py", line 209, in __new__rn instance.initialize(**args)rn File "/home/ghf/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tornado/platform/epoll.py", line 26, in initializern super(EPollIOLoop, self).initialize(impl=select.epoll(), **kwargs)rnTypeError: initialize() got an unexpected keyword argument 'make_current'rnrnKernelRestarter: restart failedrnThe kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened. 论坛

没有更多推荐了,返回首页