1.1 Requirements for AsPyLib ########################################## Python ------------------------------------------ To use AsPyLib, Python 2.6 or 2.7 must be installed on the system. Later versions (3.0, 3.1, 3.2) are not backward compatible with 2.6 or 2.7 and should be avoided. This is discussed `here `_. Earlier versions (2.5 and before) might fail due to some function called by AsPyLib that is missing. Standard Python modules ------------------------------------------ The following modules must be installed for AsPyLib: * `Numpy (v1.5.0 or higher) `_ - for "Numeric Python" - is a module that allows to handle data in the form of arrays. This `useful link `_ gives the correspondance between Matlab and Numpy functions. * `Scipy (v0.8.0 or higher) `_ - for "Scientific Python" - is a module that includes all the complex functions (Bessel, Legendre,...) as well as many other things like Fast Fourier transform, optimisation routines, etc * `Matplotlib (v1.1.0 or higher) `_ is the module used for plotting. It produces very nice figures, as can be seen on `the gallery `_. * Pywin32 (v2.16 or higher), this module is only required for Windows systems *Windows* On Windows, you only have to install Python(x,y) (`click here `_) to get the right Python distribution and modules. *Linux* On Ubuntu 10.04, Python 2.6 is installed by default. The following commands: :: apt-get install python-numpy apt-get install python-scipy apt-get install python-matplotlib will install Numpy 1.3 and Matplotlib 0.99 which are too old. AsPyLib cannot work with those versions. So first, remove (if needed) the Ubuntu versions with :: apt-get remove python-numpy apt-get remove python-scipy apt-get remove matplotlib Then install newer versions from the sources. To do it install the following :: apt-get install python-setuptools apt-get install python-dev apt-get install libfreetype6-dev apt-get install libpng12-dev apt-get install gtk2-dev apt-get build-dep python-numpy Then download the latest Numpy, Scipy and Matplotlib versions (.tar.gz) from sourceforge, unzip the archives and in each folder type the following :: python setup.py build python setup.py install If you get an error message, you are most probably missing a component. To identify the missing part: read carefully the error messages and look for missing file (such as headers .h, compiler, etc). Find what needs to be installed with apt-cache search xxx, or Google. Once this is done, repeat the installation steps until you are successful. Specific Python modules (starting at AsPyLib v2.0.0) ------------------------------------------------------ The following modules are also needed and must be installed separately. * Astropy (v0.2.3 or higher) can be installed `from there `_. This great module contains in particular Pyfits (standard IO interface with FITS files) and vo.table (to extract information from the VOtable XML files delivered by the Vizier and SkyBoT services). * Parallel Python (v1.5.7 or higher) can be downloaded `at this link `_. This module allows to implement parallel calculation to speed up the computation for some photometry scripts. Specific Python modules (versions older than AsPyLib v2.0.0) ---------------------------------------------------------------- The following modules are also needed and must be installed separately. * Pyfits (v3.0.1 or higher), this module is a standard IO interface with FITS files. It can be installed `from there `_ * Parallel Python (v1.5.7 or higher), this module allows to implement parallel calculation to speed up the computation for some photometry scripts. It can be downloaded `at this link `_ * vo.table (v0.7.2 or higher), this module allows to extract information from the VOtable XML files delivered by the Vizier and SkyBoT services. It is used only in the two functions astro.send_query_vizier() and astro.send_query_skybot(). See `here `_ for installation and `there `_ for the documentation The modules Parallel Python and vo.table are only required since AsPyLib version 1.2.0. *Windows* On Windows, the following error may occur during installation of vo.table: :: error: Unable to find vcvarsall.bat This problem is solved by performing the following steps: 1. install Mingw32. It should be already here since it's installed by default with the Python(x,y) package. Otherwise, see `here `_ and `there `_. 2. add the Mingw32 bin directory to the Windows PATH environment variable (something like C:\\Program Files\\MinGW\\bin) 3. log off and log on again so that Windows is aware of the change in the PATH variable 4. edit (create if not existing) distutils.cfg located at C:\\Python27\\Lib\\distutils\\distutils.cfg to be: :: [build] compiler=mingw32 Then, re-start the installation of vo.table, now it should work. The solution was found `at this link `_. In case of any other difficulty, some help can be found quickly on the very active `AstroPy mailing list `_.