Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132928 views
License: OTHER
1
# Check skimage along with major dependencies: numpy, scipy, matplotlib
2
import skimage
3
test_failed = bool(skimage.test())
4
if test_failed:
5
print("There were errors running scikit-image tests. "
6
"See test output for more details.")
7
skimver = int(skimage.__version__.split('.')[1].rstrip('dev'))
8
if skimver < 11:
9
print("ERROR: skimage version 0.11 or higher required. You have 0.%i." %
10
skimver)
11
12
# check matplotlib
13
import matplotlib as mpl
14
mplver_str = mpl.__version__
15
mplver = mplver_str.split('.')
16
major, minor = map(int, mplver[:2])
17
if major < 1 or (major >= 1 and minor < 1):
18
print("ERROR: matplotlib version 1.1 or higher required. You have %s." %
19
mplver_str)
20
21
# Check IPython
22
import IPython as IP
23
ipver_str = IP.__version__
24
ipver = int(ipver_str.split('.')[0])
25
if ipver < 3:
26
print("ERROR: IPython version 3.0 or higher required. You have %s." %
27
ipver_str)
28
29