This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients cheryl.sabella, doko, phr, terry.reedy
Date 2020-05-25.22:26:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590445610.66.0.199545704439.issue40734@roundup.psfhosted.org>
In-reply-to
Content
'IDLE' is an application implemented by Lib/idlelib.  At least on Windows, application startup executables (like pip.exe, on Windows) are normally installed in <pythondir>/Scripts, at least on Windows.  What, precisely, in 'installed in /usr/bin'?

By 'shell prompt', I presume you mean the $ prompt of bash or older unix shell.  What precisely did you type?  What happens if you start with
$ python3 -m idlelib
?

Unless you add -n to the above, IDLE runs in two processes: the IDLE process that runs the IDLE GUI and the user process that runs user code under the supervision of idlelib/run.py.  Each has its own sys and sys.path.  You are seeing the user process sys.path.

To see how python initially sets sys.python in the user process, before IDLE can possible modify it, edit idlelib.run by (temporarily) adding

print(sys.path, file=sys.__stdout__)

after 'import sys'.  To do this with IDLE, click File => Open module and enter 'idlelib.run'.  In case you mistakenly make IDLE not run, note where the file is and maybe make a backup first.  Then close and start IDLE in your terminal and you should see sys.path printed there.  You may see it twice.
History
Date User Action Args
2020-05-25 22:26:50terry.reedysetrecipients: + terry.reedy, doko, phr, cheryl.sabella
2020-05-25 22:26:50terry.reedysetmessageid: <1590445610.66.0.199545704439.issue40734@roundup.psfhosted.org>
2020-05-25 22:26:50terry.reedylinkissue40734 messages
2020-05-25 22:26:50terry.reedycreate