本篇讲述的是我在安装Spyder开发环境过程中遇到的问题,以及解决办法最终成功的经历,和大家分享!
-
检查Python、Spyder的环境变量配置
这里Python采用安装默认的,Spyder需要手动配置
-
win + R > cmd 进入命令行 需要用到以下几个命令:
预安装模块:pip;
作用:安装其他模块。
pip list <or> pip freeze //显示pip安装的所有库,二者均可
pip list --outdated //列出过时库
pip install [module name] //安装指定模块
pip install -U [module name] //更新指定模块
pip uninstall [module name] //卸载 需要安装的模块,如下图:
- 安装列表:
Python 2.7 or >=3.3
PyQt5 >=5.2 or PyQt4 >=4.6.0 (PyQt5 is recommended).
Qtconsole >=4.2.0 – for an enhanced Python interpreter.
Rope >=0.9.4 and Jedi <http://jedi.jedidjah.ch/en/latest/> 0.9.0 – for code completion, go-to-definition and calltips on the Editor.
Pyflakes – for real-time code analysis.
Sphinx – for the Help pane rich text mode and to get our documentation.
Pygments >=2.0 – for syntax highlighting and code completion in the Editor of all file types it supports.
Pylint – for static code analysis.
Pep8 – for style analysis.
Psutil – for memory/CPU usage in the status bar.
Nbconvert – to manipulate Jupyter notebooks on the Editor.
Qtawesome >=0.4.1 – for an icon theme based on FontAwesome.
Pickleshare – To show import completions on the Editor and Consoles.
PyZMQ – To run introspection services on the Editor asynchronously.
QtPy >=1.1.0 – To run Spyder with PyQt4 or PyQt5 seamlessly.
Chardet >=2.0.0– Character encoding auto-detection in Python.
Numpydoc Used by Jedi to get return types for functions with Numpydoc docstrings.
可能遇到的问题:
ModuleNotFoundError: No module named 'qtconsole'
这时就要采用pip命令下载安装对应模块,有时候模块很大下载会很慢,建议如下:
这时候推荐一个资源库:
pythonlibs
下载对应的whl文件,执行
pip3 install C:\Users\weddy\Downloads\PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-none-win_amd64.whl
结果如上图
到此开始启动Spyder
执行命令:spyder,启动界面: