Terry J. Reedy <tjre...@udel.edu> added the comment:
'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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40734> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com