Ned Deily <n...@python.org> writes: > On Jan 14, 2021, at 09:22, Peng Yu <pengyu...@gmail.com> wrote: >> The /etc/paths.d directory on Mac OS X contains the following >> directory. Some packages have their PATH variables set there. >> >> For Python, I have to set the PATH manually in my ~/.bashrc. Should >> the Python developers consider setting PATH in /etc/paths.d as well? >> >> ==> /etc/paths.d/100-rvictl <== >> /Library/Apple/usr/bin >> >> ==> /etc/paths.d/40-XQuartz <== >> /opt/X11/bin >> >> ==> /etc/paths.d/com.vmware.fusion.public <== >> /Applications/VMware Fusion.app/Contents/Public > > Thanks for the suggestion. At first glance, that would seem to be an > attractive option; it's something we've looked at > recently. Unfortunately, there is a major usability issue with it on > current macOS (10.15 Catalina and 11 Big Sur) where Apple now provides > both a "python3' and a "pip3" stub in /usr/bin that link to versions > they supply in current Xcode or Command Line Tools releases. Those > versions are supplied primarily to support other Xcode tools and are > not intended to provide a full user Python installation. > > The problem is that paths added via /etc/paths.d are appended to PATH > *after* /usr/local/bin and /usr/bin so it is not possible to override > "python3" and "pip3" this way. > > We are still considering ways to improve the path management for > python.org installers on macOS but simply relying on /etc/paths.d > isn't sufficient, alas.
Probably very recently (Big Sur), but MacOS has stopped adding /etc/paths.d into default PATH env variable. /etc/paths.d is loaded only when you call eval "$(/usr/libexec/path_helper)" So, I had to add the above command in my ~/.bash_profile (interactive login) to load my various utilities like TeX. -- Regards, Pankaj Jangid GnuPG Fingerprint: 0B62 7424 3B26 A911 052A DDE6 7C95 6E6F F858 7689 _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/SFNA6D6FQQARQHYRHGITOIA3SNCH7DZZ/ Code of Conduct: http://python.org/psf/codeofconduct/