前两天在学习wxWidgets这个类似MFC的跨平台C++ GUI framework,发现它在其它语言的绑定也很丰富,于是想尝试一下它的wxPython,好吧,既然是Python绑定,那就需要先安装Python解释器,后来又想装个Python IDE来玩玩,于是开始从网上了解常用的Python IDE及其差异,当然对于我们这种屌丝程序猿商业版的首先不考虑,最后就看中了Eric。
安装Eric开始也碰到一堆问题,总是安装不成功,开始是忘了安装SIP,后来有发现安装后启动失败,查找网上的帖子,也有不少朋友遇到过类似的问题--Python, PyQt, Eric版本兼容的问题。
废话少说,直接上我这边安装成功的各个版本及安装步骤,供大家及自己以后参考或备份。
Eric4的安装类似,只是版本选择差异,请看我的下一篇《Python IDE Eric4 windows安装》。
J:\sw\PyQt\sip-4.14.6>python configure.py -p win32-g++
This is SIP 4.14.6 for Python 3.3.1 on win32.
The SIP code generator will be installed in J:\install\Python33.
The sip module will be installed in J:\install\Python33\Lib\site-packages.
The sip.h header file will be installed in J:\install\Python33\include.
The default directory to install .sip files in is J:\install\Python33\sip.
The platform/compiler configuration is win32-g++.
Creating siplib\sip.h...
Creating siplib\siplib.c...
Creating siplib\siplib.sbf...
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...
J:\sw\Eric\eric5-5.2.2>python install.py -a J:\install\Python32\Lib\site-package
s\PyQt4\qsci\api
Checking dependencies
Python Version: 3.2.3
Found PyQt4
Found QtHelp
Found QScintilla2
Qt Version: 4.8.2
PyQt Version: 4.9.4
QScintilla Version: 2.6.2
All dependencies ok.
Compiling user interface files...
Compiling source files...
Installing eric5 ...
Installation complete.
Press enter to continue...
J:\sw\Eric\eric5-5.2.2>
注意安装eric的时候选择API files安装的路径,可以用下面方法查看是否有设置默认的path:
J:\sw\Eric\eric5-5.2.2>python install.py -h
Usage:
install.py [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]
where:
-h display this help message
-a dir where the API files will be installed
(default: C:\Qt\4.8.2\qsci\api)
-b dir where the binaries will be installed
(default: J:\install\Python32)
-d dir where eric5 python files will be installed
(default: J:\install\Python32\Lib\site-packages)
-f file configuration file naming the various installation paths
-x don't perform dependency checks (use on your own risk)
-c don't cleanup old installation first
-z don't compile the installed python files
The file given to the -f option must be valid Python code defining a
dictionary called 'cfg' with the keys 'ericDir', 'ericPixDir', 'ericIconDir',
'ericDTDDir', 'ericCSSDir', 'ericStylesDir', 'ericDocDir', 'ericExamplesDir',
'ericTranslationsDir', 'ericTemplatesDir', 'ericCodeTemplatesDir',
'ericOthersDir','bindir', 'mdir' and 'apidir.
These define the directories for the installation of the various parts of eric5.
Press enter to continue...
我这里默认是C:\Qt\4.8.2\qsci\api,但是我不想让它安装在这里,所以我用-a J:\install\Python32\Lib\site-packages\PyQt4\qsci\api把它指定到这个路径下统一管理。