Skip to content

Commit 564140b

Browse files
update
1 parent 8c921cb commit 564140b

File tree

134 files changed

+33171
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+33171
-0
lines changed
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
'''
2+
Content under Creative Commons Attribution license CC-BY 4.0,
3+
code under MIT license (c)2014 Sergio Rojas ([email protected])
4+
and Erik A Christensen ([email protected]).
5+
6+
http://en.wikipedia.org/wiki/MIT_License
7+
http://creativecommons.org/licenses/by/4.0/
8+
9+
This code is used to display information about the packages
10+
SciPy, Numpy, Matplotlib, IPython, and Pandas installed on
11+
a Python. It also performs the execution of tests suites included
12+
with such packages.
13+
14+
Created on September, 21, 2014
15+
Last Modified on: September, 21, 2014
16+
17+
'''
18+
19+
# Checking the Python Version installed on this system:
20+
21+
22+
import sys
23+
24+
import platform
25+
26+
print("\n")
27+
28+
print("Python distribution details: ")
29+
30+
print(sys.version)
31+
32+
print("\n")
33+
34+
print(str("Installed Python Version is: ")+str(platform.python_version()))
35+
36+
37+
38+
# Checking the Numpy Version installed on this system:
39+
40+
try:
41+
42+
import numpy
43+
44+
print(str("Installed Numpy version is: ")+str(numpy.__version__))
45+
46+
except ImportError:
47+
48+
sys.exit("Error : Numpy can not be imported or is not installed.")
49+
50+
51+
52+
# Checking the Scipy Version installed on this system:
53+
54+
try:
55+
56+
import scipy
57+
58+
print(str("Installed Scipy version is: ")+str(scipy.__version__))
59+
60+
except ImportError:
61+
62+
sys.exit("Error : Scipy can not be imported or is not installed.")
63+
64+
65+
66+
# Checking the Ipython Version installed on this system:
67+
try:
68+
69+
import IPython
70+
71+
print(str("Installed IPython version is: ")+str(IPython.__version__))
72+
73+
except ImportError:
74+
75+
sys.exit("Error : IPython can not be imported or is not installed.")
76+
77+
78+
79+
# Checking the Matplotlib Version installed on this system:
80+
try:
81+
82+
import matplotlib
83+
84+
print(str("Installed Matplotlib version is: ")+str(matplotlib.__version__))
85+
86+
except ImportError:
87+
88+
sys.exit("Error : Matplotlib can not be imported or is not installed.")
89+
90+
91+
92+
# Checking the Pandas Version installed on this system:
93+
try:
94+
95+
import pandas
96+
97+
print(str("Installed Pandas version is: ")+str(pandas.__version__))
98+
99+
except ImportError:
100+
101+
sys.exit("Error : Pandas can not be imported or not installed.")
102+
103+
104+
print("\n")
105+
106+
print("\t Necessary tools are installed. This system seems to be ready")
107+
108+
print("\t to crunch numbers via python ...")
109+
110+
111+
print("\n")
112+
113+
print("\t There are some tests one can run to check...")
114+
115+
print("\t if the installed packages work correctly...")
116+
117+
print("\t Each test takes some time. ...")
118+
119+
120+
121+
# This makes input to work in Python 2 and 3.
122+
123+
try:
124+
125+
input = raw_input
126+
127+
except NameError:
128+
129+
pass
130+
131+
132+
print("\n")
133+
print("\t Would you like to run the NUMPY basic test suite...")
134+
135+
ans = input("For yes, enter y and hit return: ")
136+
137+
if ans=='y':
138+
139+
print(str("Running some Numpy tests: "))
140+
141+
numpy.test()
142+
143+
144+
print("\n")
145+
146+
print("\t Would you like to run the SCIPY basic test suite...")
147+
148+
ans = input("For yes, enter y and hit return: ")
149+
150+
if ans=='y':
151+
152+
print(str("Running some Scipy tests: "))
153+
154+
scipy.test()
155+
156+
157+
print("\n")
158+
159+
print("\t Would you like to run the MATPLOTLIB basic test suite...")
160+
161+
ans = input("For yes, enter y and hit return: ")
162+
163+
if ans=='y':
164+
165+
print(str("Running some Matplotlib tests: "))
166+
167+
matplotlib.test()
168+
169+
170+
print("\n")
171+
172+
print("\t Would you like to run the IPYTHON basic test suite...")
173+
174+
ans = input("For yes, enter y and hit return: ")
175+
176+
if ans=='y':
177+
178+
print(str("Running some Ipython tests: "))
179+
180+
IPython.test()

0 commit comments

Comments
 (0)