安装spyder遇到的一些小问题
1. 首先安装python,目前用的是3.8版本
2. 自带一个pip 包管理器(我记得版本好像是10+)
3. spyder 可以用pip 直接安装 (前辈说这样安装包的时候好管理,我初学还体会不到)
4. 安装spyder的过程中报错了。。。
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
5. 网上搜索了很多,都是在说 重新安装 microsoft visual 以及有热心网友提供了只安装编译版本的链接。
6. 我的心路历程是 网上搜,然后再看具体报错。 但是我忽略了一个细节,就是有个warning 让我更新 pip。
7. 正好问了个前辈,前辈都没遇到过这个错误。但是她解决问题的思路给我震撼到了。直接更新pip,通过 pip install -u pie ,然后又报warning
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
于是设置公司内部代理,proxy 设置里已经设置了,不生效,于是 通过命令行设置 set http_proxy=xx.xx.xx.xx:xx;终于把pip更新成功了。
然后继续安装 pip install spyder 成功。
结果不重要,重要的是这个过程学到了什么。 我学到了 渊博,淡定,从容。其实任何事都应该这样解决不是嘛; 曾几何时,有句话叫 猝然临之而不惧,无故加之而不怒。说的不也是这个意思嘛。
还是总结一下吧
遇到安装 spyder 的时候 microsoft visual C++ 版本需要升级的时候。
1. 更新pip ----- pip install --upgrate pie
2. 遇到安装或者更新的时候报 retrying的时候 设置下代理, 一般是 set http_proxy='xx.xx.xx.xx:xx' 或者是 到管理员命令行执行
3. 然后重新安装 spyder 就成功了。