User Tools

Site Tools


documents:110803compilespyder

This is an old revision of the document!


Compiling Spyder (Python IDE)

Spyder is a matlab-like IDE for scientific computing. Following assumes that numpy and scipy is already installed in your python. I compiled spyder in both windows (32bit) and OSX machine (64bit) and both worked well. Below is compiling procedure for Windows.

Install Qt (binary)

Download binary (“library” version) from Nokia site and install Qt. I used “Qt libraries 4.7.3 for Windows (minGW 4.4, 319 MB)”. mingW was chosen since I had many troubles before with VC compiled python modules. Since compiler is better be always same, I use mingW.

Important: After installation, set Path to Qt. Path to the c:\Qt\4.3.7\bin should be at the very front of all the other application bin path. These days, there are so many applications that comes with QtCore4.dll and if these are in front of installed Qt directory, then the wrong one is recognized.

Install SIP (source).

Download source from Riverbank, compile and install by

python config.py -p win32-g++
mingw32-make
mingw32-make install

Install PyQt (source)

Download Source from Riverbank and compile & install by

python config.py -w
mingw32-make
mingw32-make install

Check if PYQT is installed correctly: run script below.

import sys
from PyQt4.QtGui import *
app = QApplication(sys.argv)
button = QPushButton("Hello World", None)
button.show()
app.exec_()

Install Optional Modules

There is a list of recommended (though optional) modules in Spyder site. I installed them all using easy_install.

  • rope
  • pyflakes

I already had numpy, scipy, matplotlib, sphinx & Ipython installed. I only updated numpy using superpackage.

Compile Spyder: preparation

Some changes are required for PIL module being easy-to-be namespace conflicted in some imports. Error occurred during make of Spyder in some modules due to way PIL module is imported. For example, import Image is not specific because there are other python file with name Image.py in module other than PIL. Then import fails.

Change follwoing codes:

1. C:\Python26\Lib\site-packages\scipy\misc\pilutil.py line 10:

#import Image
from PIL import Image
2. C:\Python26\lib\site-packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\directives\images.py

line 19 -

#try:
#    import Image as PIL                        # PIL
#except ImportError:
#    PIL = None
# patched according to http://d.hatena.ne.jp/kk6/20110302
try:
    import PIL
except ImportError:
    try:
        import Image as PIL                        # PIL
    except ImportError:
        PIL = None

patched according to http://d.hatena.ne.jp/kk6/20110302

Compile Spyder

Download source and

python setup.py install

Notes

  • If you want to install in windows, one could also use “Python(x,y)”, a distribution of python pre-packaged with scientific computing modules, also including spyder. I did not do this because I already had some modules in my desktop, and also did not want to be restricted for upgrading using source.
  • Also on windows, there is a great site distributing modules as binary .exe. SeeChristoph Gohlke's site
  • I especially wanted to compile PyQt by myself, since this is a key module that needs to be under a good control. Many modules use PyQt.
documents/110803compilespyder.1312360237.txt.gz · Last modified: 2016/05/24 12:46 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki