Python Environment Control: Avoid System's Distributed Python

#python tip from the Nutshell. This knowledge is becoming more common, but still perplexes beginners: Leave the system’s Python to the system. “We recommend taking control of your Python environment. In particular, do not build applications on top of a system’s distributed Python. Instead, install another Python distribution independently and adjust your shell environment so that the ‘python’ command runs your locally installed Python rather than the system’s Python.”

In addition, on the Mac, the homebrew Python should also be avoided. it's there for the use of the homebrew system, and WILL change underneath you someday, which you can't prevent.

Like
Reply

Was working on a repo to help non-Pythonic peeps bootstrap a Python env and it says in the README.md - "System Python is NOT FOR YOU!"

There's still sometimes a little friction when using libraries that the system also uses (but you don't care about the system part) - e.g. GUI apps from virtualenv. Probably because the bindings pre-date virtualenv. Maybe one day that will be solved, but it's been a long time.

Like
Reply

I have no big problem with keeping the system Python and making virtual envs out of it, but only install packages on the system Python if you really have no sane alternative.

Like
Reply

Are you talking about virtual environment in other words?

Like
Reply

It was great to see at PyCon 2024 !

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories