Session Info 2 is a Python library that prints detailed version information for all currently imported packages and system details, useful for debugging and reproducibility. It's an improved successor to the original `session-info` library. The current version is 0.4.1, with releases occurring every few months to add features and improvements.
pip install session-info2Verified import paths — ran on the pinned version, not inferred.
The most common way to use `session-info2` is to simply call `session_info.show()`. This will print a comprehensive summary of your Python environment, including package versions and system details, directly to the console. As of v0.4, you can also use the `.format()` method on the returned object for specific output types.
Confirm you have installed `session-info2` (and not `session-info`) using `pip show session-info2`. If migrating, be aware of behavioral changes.
For JSON output, call `session_info.show(display_mode='json')` or, for v0.4+, `print(session_info.show().format('json'))`.Upgrade to `session-info2>=0.4` to use the `.format()` method, or use `session_info.show(display_mode='...')` for older versions.
No dependency data recorded yet.