Created
November 19, 2024 14:51
-
-
Save sarthakpati/7475d26d92e6e0fcc67f7d8ad2dc16ad to your computer and use it in GitHub Desktop.
A small script to generate system debugging information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import platform | |
from pip import main | |
from deprecated import deprecated | |
print(f"Platform: {platform.platform()}") | |
print(f"Machine: {platform.machine()}") | |
print(f"Processor: {platform.processor()}") | |
print(f"Architecture: {(' ').join(list(platform.architecture()))}") | |
print("Python environment:") | |
print(f" Version: {platform.python_version()}") | |
print(f" Implementation: {platform.python_implementation()}") | |
print(f" Compiler: {platform.python_compiler()}") | |
print(f" Build: {(' ').join(list(platform.python_build()))}") | |
print(" Installed packages:") | |
print(main(["list"])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment