Skip to content

Instantly share code, notes, and snippets.

@sarthakpati
Created November 19, 2024 14:51
Show Gist options
  • Save sarthakpati/7475d26d92e6e0fcc67f7d8ad2dc16ad to your computer and use it in GitHub Desktop.
Save sarthakpati/7475d26d92e6e0fcc67f7d8ad2dc16ad to your computer and use it in GitHub Desktop.
A small script to generate system debugging information
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