[Python-ideas] "import me" to display some summary of the current python installation
Paul Moore
p.f.moore at gmail.com
Wed Apr 12 10:01:41 EDT 2017
On 12 April 2017 at 14:35, Kamal Mustafa <kamal.mustafa at gmail.com> wrote:
> Never mind. site._script() as pointed out by Wes Turner is what I need:-
>
> Python 3.4.2 (default, Oct 8 2014, 10:45:20)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import site
>>>> site._script()
> sys.path = [
> '',
> '/usr/lib/python3.4',
> '/usr/lib/python3.4/plat-x86_64-linux-gnu',
> '/usr/lib/python3.4/lib-dynload',
> '/usr/local/lib/python3.4/dist-packages',
> '/usr/lib/python3/dist-packages',
> ]
> USER_BASE: '/home/kamal/.local' (exists)
> USER_SITE: '/home/kamal/.local/lib/python3.4/site-packages' (doesn't exist)
> ENABLE_USER_SITE: True
Unless you have to get this information from within the Python
interactive prompt, you can just run "python -m site" from the shell
prompt to get the same information.
Paul
More information about the Python-ideas
mailing list