python 安装直接访问:https://www.python.org/downloads/
![](https://img.haomeiwen.com/i5348804/d192f5b0c9200e29.png)
直接点击下载最新的版本就行,安装的时候勾选上add path,安装完就直接配置好环境变量了,方便的很。
安装完毕python 后,可以选择pip安装jupyer;那么为什么安装完python后,就可以使用pip安装呢,原理是这个:
![](https://img.haomeiwen.com/i5348804/dfa92dc18a89630a.png)
pip安装,直接去cmd 命令窗口;
C:\Users\wyz\AppData\Local\Programs\Python\Python38-32\Scripts>pip install jupyter notebook
![](https://img.haomeiwen.com/i5348804/153afc32a0ad1cc7.png)
要是不知道你python 安装在哪里了,可以在命令窗口输入 where python 来查询;
安装过程中有可能会报错:我遇到的跟大家说一下:
(1)pip版本太低:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(很人性化的提出了你要升级,升级一下接着干就行了)
C:\Users\wyz>python -m pip install --upgrade pip
![](https://img.haomeiwen.com/i5348804/e889f253903b9c05.png)
升级完毕后继续C:\Users\wyz>pip install jupyter notebook;
然后又报错:这一坨
![](https://img.haomeiwen.com/i5348804/33c3ff02fc77503d.png)
(2)接着再升级一下setuptools;然后再接着干pip install jupyter notebook
C:\Users\wyz>pip install --upgrade setuptools
![](https://img.haomeiwen.com/i5348804/0840cfd05df84a9d.png)
安装完毕:
![](https://img.haomeiwen.com/i5348804/708ec5135b8f099d.png)
启动jupyter notebook,又报错,启动不起来:
报错:Traceback (most recent call last):
![](https://img.haomeiwen.com/i5348804/95afc5780f14bdc9.png)
找到:C:\Users\wyz\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\pip路径下的这个文件,编辑一下:
if __name__ == '__main__':
#sys.exit(_main())
sys.exit(_main__._main())
![](https://img.haomeiwen.com/i5348804/36dc21c5ed8ae39a.png)
![](https://img.haomeiwen.com/i5348804/39738fcf770db509.png)
然后继续启动,还是报错: raise NotImplementedError NotImplementedError
感谢论坛大佬,让我找到 解决方案:找到这个文件:
C:\Users\wyz\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\tornado\platform
打开,编辑一下
![](https://img.haomeiwen.com/i5348804/dafb4aa3db0b0a9d.png)
把内容加进去:
import asyncio
import sys
if sys.platform == 'win32' and sys.version_info > (3, 8, 0, 'alpha', 3) :
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
![](https://img.haomeiwen.com/i5348804/54c8ba5cbab9fd88.png)
然后再启动:就成功啦;
![](https://img.haomeiwen.com/i5348804/ddf0e115a64e2343.png)
![](https://img.haomeiwen.com/i5348804/75f45b027c3bf240.png)
网友评论