-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversions.py.old
More file actions
executable file
·49 lines (38 loc) · 865 Bytes
/
versions.py.old
File metadata and controls
executable file
·49 lines (38 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
try:
import numpy as np
except ModuleNotFoundError:
np = None
try:
import pandas as pd
except ModuleNotFoundError:
pd = None
try:
import matplotlib as mpl
except ModuleNotFoundError:
mpl = None
try:
import sklearn
except ModuleNotFoundError:
sklearn = None
try:
import scipy
except ModuleNotFoundError:
scipy = None
try:
import seaborn
except ModuleNotFoundError:
seaborn = None
import sys
def helper(name, imp):
if imp:
print("%s version: %s from file %s" % (name, imp.__version__, imp.__file__))
else:
print("%s not installed" % name)
print("Python version:", sys.version.split('\n')[0])
helper("numpy", np)
helper("pandas", pd)
helper("matplotlib", mpl)
helper("scikit-learn", sklearn)
helper("scipy", scipy)
helper("seaborn", seaborn)