forked from SION001122/Personalized-Web-streaming-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.py
32 lines (29 loc) · 993 Bytes
/
install.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
import subprocess
import sys
# 설치가 필요한 패키지 목록
required_packages = [
"flask",
"mutagen",
"pillow",
]
def install_packages(packages):
for package in packages:
try:
# pip 명령어를 실행하여 패키지 설치
result = subprocess.run(
[sys.executable, "-m", "pip", "install", package],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
if result.returncode == 0:
print(f"'{package}' 설치 성공!")
else:
print(f"'{package}' 설치 실패: {result.stderr}")
except Exception as e:
print(f"'{package}' 설치 중 에러 발생: {e}")
if __name__ == "__main__":
# 패키지 설치 실행
print("필요한 패키지 설치를 시작합니다...")
install_packages(required_packages)
print("모든 패키지 설치가 완료되었습니다!")