-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathmanual_setup.py
39 lines (31 loc) · 941 Bytes
/
manual_setup.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
from os import system,name
def setup():
# system('pip3 install -i requirements.txt')
# for windows
if name == 'nt':
print("System found : Windows.")
system('pip3 install pypiwin32')
# for mac and linux(here, os.name is 'posix')
else:
print("System found : Linux.")
system('sudo apt-get install python3-dev build-essential')
system('sudo apt-get install python3-pyaudio')
system('pip3 install pyttsx3')
with open('requirements.txt') as f:
need = f.read()
system("pip install wheel")
lt = need.split('\n')
# print(lt)
ok = True
for module in lt:
if module == '':
continue
try :
system('pip3 install '+module)
except:
print("Can't install "+module + " :(")
ok = False
if ok:
print('\nSetup is completed.')
if __name__ == "__main__":
setup()