提交 bf9c60e1 编写于 作者: W weixin_45693548

Fri Aug 4 18:51:00 CST 2023 inscode

上级 d7d0464e
import subprocess
# 你的依赖列表
dependencies = ["numpy", "pandas", "matplotlib", "scikit-learn"]
for dep in dependencies:
print(f"开始安装: {dep}")
process = subprocess.Popen(["pip", "install", dep], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in iter(process.stdout.readline, b''):
line = line.decode('utf-8')
print(line) # 打印pip的完整输出
process.stdout.close()
process.wait()
\ No newline at end of file
......@@ -14,9 +14,9 @@ def install_dependency(dependency, overall_bar, installed_dependencies):
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
# for line in process.stdout:
# line = line.strip()
# print(line)
for line in process.stdout:
line = line.strip()
print(line)
# Wait for the installation process to complete
process.wait()
......
/usr/bin/python
\ No newline at end of file
python
\ No newline at end of file
python
\ No newline at end of file
lib
\ No newline at end of file
home = /usr/bin
include-system-site-packages = false
version = 3.9.16
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册