1.用pip install jupyter 安装到一半就报错
错误提示:
building 'zmq.libzmq' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
解决方案:
第一步:
打开网站:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
看看building 后面的错是哪个组件,这次错是由于zmq.libzmq 组件没有,
下载对应的 pyzmq‑18.1.1‑cp37‑cp37m‑win_amd64.whl。
cp后面的对应就是Python的版本,如cp36就是Python3.6。
64位操作系统就下载win-amd64,32位下载win32
装的python3.7版本,所以就下载了:pyzmq‑18.1.1‑cp37‑cp37m‑win_amd64.whl
第二步: 文件下载好之后;执行下面的脚本进行安装(pyzmq‑18.1.1‑cp37‑cp37m‑win_amd64.whl),
pip install C:\Users\MCZho\Downloads\pyzmq-18.1.1-cp37-cp37m-win_amd64.whl
第三步:可以重新安装你需要的包 ;执行pip install jupyter
jupyter 相关配置:
jupyter 修改默认打开路径
第一步:jupyter notebook --generate-config,可以查看配置文件的路径;
我电脑上jupyter配置文件的路径:C:\Users\MCZho\.jupyter\jupyter_notebook_config.py
第二步:根据第一步显示的文件路径,找到jupyter_notebook_config.py 打开该文件
找到 c.NotebookApp.notebook_dir 节点,把指定目录改成你需要的目录;
把c.NotebookApp.notebook_dir 前面的# 去掉,保存即可
jupyter 的使用:
直接在控制台上输入 :jupyter notebook ,会通过浏览器来打开编辑器