freenove_car/Code/setup.py
a838557765 d8141ca9d0 Update
Fixed the problem of rpi_ws281x library and starting the server without
interface
2021-01-04 15:56:32 +08:00

20 lines
593 B
Python

import os
import sys
import time
os.system("cd /usr/bin && sudo rm python && sudo ln -s python3 python")
flag=0x00
for x in range(1,4):
if os.system("sudo apt-get update") == 0:
if os.system("sudo apt-get upgrade -y") == 0:
flag=flag | 0x01
break
for x in range(1,4):
if os.system("sudo apt-get install -y python3-dev python3-pyqt5 ") == 0:
flag=flag | 0x02
break
if flag==0x03:
print("\nNow the installation is successful.")
else:
print ("\nSome libraries have not been installed yet. Please run 'sudo python setup.py' again")