forked from robertobucher/pysimCoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu_dependency_installer.py
52 lines (47 loc) · 1.29 KB
/
ubuntu_dependency_installer.py
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
49
50
51
52
import os
import sys
print("Trying to install modules for ubuntu")
# install some dependencies
APT_GET_INSTALL = "apt-get install -y"
APT_GET_BIBS = [
"make",
"curl",
"gfortran",
"liblapack-dev",
"libopenblas-dev",
]
if 3 == sys.version_info[0]:
PYTHON = "python3"
APT_GET_BIBS += [
PYTHON + "-dev",
PYTHON + "-distutils",
PYTHON + "-testresources",
PYTHON + "-pyqt5",
PYTHON + "-pyqt5.qtsvg",
PYTHON + "-dbus.mainloop.qt",
PYTHON + "-pyqtgraph",
PYTHON + "-serial",
PYTHON + "-lxml",
PYTHON + "-setuptools",
PYTHON + "-simplejson",
PYTHON + "-skimage",
PYTHON + "-skimage-lib",
PYTHON + "-tk",
]
else:
APT_GET_BIBS += [
"python-dev",
"python-distutils",
"python-testresources",
"python-scipy",
"python-qt5",
"python-qt4-dbus",
"python-tk",
]
print(os.system("apt-get update"))
for module in APT_GET_BIBS:
print("trying to install " + module)
print(os.system(" ".join((APT_GET_INSTALL, module))))
# install pip
print(os.system('curl "https://bootstrap.pypa.io/get-pip.py" '
+ '| sudo ' + sys.executable))