python 安装直接访问:https://www.python.org/downloads/

直接点击下载最新的版本就行,安装的时候勾选上add path,安装完就直接配置好环境变量了,方便的很。
安装完毕python 后,可以选择pip安装jupyer;那么为什么安装完python后,就可以使用pip安装呢,原理是这个:

pip安装,直接去cmd 命令窗口;
C:\Users\wyz\AppData\Local\Programs\Python\Python38-32\Scripts>pip install jupyter notebook

要是不知道你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

升级完毕后继续C:\Users\wyz>pip install jupyter notebook;
然后又报错:这一坨

(2)接着再升级一下setuptools;然后再接着干pip install jupyter notebook
C:\Users\wyz>pip install --upgrade setuptools

安装完毕:

启动jupyter notebook,又报错,启动不起来:
报错:Traceback (most recent call last):

找到:C:\Users\wyz\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\pip路径下的这个文件,编辑一下:
if __name__ == '__main__':
#sys.exit(_main())
sys.exit(_main__._main())


然后继续启动,还是报错: raise NotImplementedError NotImplementedError
感谢论坛大佬,让我找到 解决方案:找到这个文件:
C:\Users\wyz\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\tornado\platform
打开,编辑一下

把内容加进去:
import asyncio
import sys
if sys.platform == 'win32' and sys.version_info > (3, 8, 0, 'alpha', 3) :
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

然后再启动:就成功啦;


网友评论