source: sasview/check_packages.py @ b099388

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since b099388 was b441081, checked in by ajj, 11 years ago

Updated check_packages to provide more information about installed versions of required packages

  • Property mode set to 100644
File size: 4.4 KB
Line 
1"""
2Checking and reinstalling the external packages
3"""
4import os
5import sys
6
7if sys.platform =='win32':
8    IS_WIN = True
9else:
10    IS_WIN = False
11try:
12    import setuptools
13    print "==> setuptools-%s installed."% setuptools.__version__
14    if setuptools.__version__ != '0.6c11':
15        print "!!! Recommend to install 0.6c11." 
16except:
17    print "!!! setuptools-0.6c11 not installed."
18try:
19    import pyparsing
20    print "==> pyparsing-%s installed."% pyparsing.__version__
21    if pyparsing.__version__ != '1.5.5':
22        print "!!! 1.5.5 recommended."
23except:
24    print "==> pyparsing-1.5.5 not installed."
25try:
26    import html5lib
27    print "==> html5lib-%s installed."% html5lib.__version__
28    if html5lib.__version__.count('0.95') > 0:
29        print "!!! 0.95 recommended."
30except:
31    print "!!! html5lib-0.95 not installed."
32try:
33    import pyPdf
34    print "==> pyPdf-%s installed."% pyPdf.__version__
35    if pyPdf.__version__ != '1.13':
36        print "!!! 1.13 recommended."
37except:
38    print "!!! pyPdf-1.13 not installed (optional)."
39try:
40    import reportlab
41    print "==> reportlab-%s installed."% reportlab.__version__
42    if reportlab.__version__ != '2.5':
43        print "!!! 2.5 recommended"
44except:
45    print "!!! reportlab-2.5 not installed."
46try:
47    import lxml
48    print "==> lxml-%s installed."% lxml.__version__
49    if lxml.__version__ != '2.3':
50        print "!!! 2.3 recommended"
51except:
52    print "!!! lxml-2.3 not installed."
53try:
54    import Image
55    print "==> PIL-%s installed."% Image.VERSION
56    if Image.VERSION != '1.1.7':
57        print "!!! 1.1.7 recommended."
58except:
59    print "!!! PIL-1.1.7 not installed."
60try:
61    import pylint
62    print "==> pylint installed."
63except:
64    print "!!! pylint not installed (optional)."
65    #os.system("START /B C:\python26\Scripts\easy_install pylint==0.25.0")
66try:
67    import periodictable
68    print "==> periodictable-%s installed."% periodictable.__version__
69    if periodictable.__version__ != '1.3.0':
70        print "!!! Recommend to install 1.3.0." 
71except:
72    print "!!! periodictable-1.3.0 is not installed."
73try:
74    import numpy
75    print "==> numpy-%s installed."% numpy.__version__
76    if numpy.__version__ != '1.6.1':
77        print "==> Recommend to install 1.6.1 (1.5.1 for MAC)." 
78except:
79    print "!!! numpy-1.6.1 not installed (1.5.1 for MAC)."
80try:
81    import scipy
82    print "==> scipy-%s installed."% scipy.__version__
83    if scipy.__version__ != '0.10.1':
84        print "!!! Recommend to install 0.10.1 (1.10.0 for MAC)." 
85except:
86    print "!!! scipy-0.10.1 not installed (1.10.0 for MAC)."
87try:
88    import wx
89    print "==> wxpython-%s installed."% wx.__version__
90    if wx.__version__ != '2.8.12.1':
91        print "!!! Recommend to install unicode-2.8.12.1." 
92except:
93    print "!!! wxpython-unicode-2.8.12.1 not installed."
94try:
95    import matplotlib
96    print "==> matplotlib-%s installed."% matplotlib.__version__
97    if matplotlib.__version__ != '1.1.0':
98        print "!!! Recommend to install 1.1.0 (1.0.1 for MAC) or higher." 
99except:
100    print "!!! matplotlib-1.1.0 not installed (1.0.1 for MAC)."
101try:
102    from ho import pisa
103    if pisa.__version__ == '3.0.27':
104        print "==> pisa-%s installed."% pisa.__version__
105    else:
106        print "!!! Incorrect version of pisa installed."
107        print "!!! 3.0.27 required."
108except:
109    print "!!! pisa-3.0.27 not installed."
110if IS_WIN:
111    try:
112        import pywin
113        print "==> pywin32 installed."
114    except:
115        print "!!! pywin32 not installed. Please install pywin32-217."
116    try:
117        import py2exe
118        print "==> py2exe-%s installed."% py2exe.__version__
119        if py2exe.__version__ != '0.6.9':
120            print "!!! Recommend to install 0.6.9." 
121    except:
122        print "!!! py2exe-0.6.9 not installed. Installing..."
123    try:
124        import comtypes
125        print "==> comtypes-%s installed."% comtypes.__version__
126        if comtypes.__version__ != '0.6.2':
127            print "!!! Recommend to install 0.6.2." 
128    except:
129        print "!!! comtypes-0.6.2 not installed. Installing..."
130    print "==> Require subversion = 1.6.0 or lower version."
131    print "Installed:"
132    os.system("CALL svn --version --quiet")
133    print "==> Checking gcc compiler ( >= 4.2 required):"
134    os.system("CALL gcc -v")
135else:
136    try:
137        import py2app
138        print "==> py2app-%s installed."% py2app.__version__
139    except:
140        print "!!! py2app not installed (optional for MAC bundling."
141
Note: See TracBrowser for help on using the repository browser.