Skip to content

Commit

Permalink
stdout install oss2
Browse files Browse the repository at this point in the history
  • Loading branch information
HowcanoeWang committed Aug 19, 2024
1 parent 63239ed commit aed46b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion easyidp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,13 @@ def parse_relative_path(root_path, relative_path):
import oss2
except ImportError:
print("oss2 is not installed. Installing now...")
subprocess.check_call([sys.executable, "-m", "pip", "install", "oss2", "-i", "https://pypi.tuna.tsinghua.edu.cn/simple"])
result = subprocess.run(
[sys.executable, "-m", "pip", "install", "oss2", "-i", "https://pypi.tuna.tsinghua.edu.cn/simple"],
stdout=sys.stdout,
stderr=sys.stderr
)
if result.returncode != 0:
raise RuntimeError(f"Failed to install oss2. pip exited with status {result.returncode}")
print("oss2 has been installed.")

try:
Expand Down

0 comments on commit aed46b0

Please sign in to comment.