Forked from vlasovskikh/check_python_interpreter.py
Last active
November 8, 2017 20:44
-
-
Save rbellamy/e123a936c601cb8af719ec055fcb7225 to your computer and use it in GitHub Desktop.
Information about Python interpreter and environment
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 sys | |
import os | |
import pkg_resources | |
from pprint import pprint | |
pprint({ | |
'sys.version_info': sys.version_info, | |
'sys.prefix': sys.prefix, | |
'sys.path': sys.path, | |
'pkg_resources.working_set': list(pkg_resources.working_set), | |
'os.environ': { | |
name: value.split(os.pathsep) if 'PATH' in name else value | |
for name, value in os.environ.items() | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment