Sample Header Ad - 728x90

Does homebrew and Xcode python share the same environment?

0 votes
0 answers
74 views
I am trying to flesh-out a mental model of Python environments for my MacBook (MacOS Ventura 12.x). I am aware of venv (virtual environments) and that it serves to prevent updates from changing the venv python3 version and its venv modules (separate configuration management). My Mac is outfitted with homebrew: 1) /usr/bin/python3 -V1 returns the **Xcode** Python version: 3.9.6 2) python3 --version or python3 -V returns "Python 3.10.8" 3) brew list | grep python returns: python-packaging python@3.10 python@3.11 python@3.12 python@3.13 mysql-connector-python 4. which python3 returns /usr/local/bin/python3 (Xcode python I presume) 5. brew install python returns: Warning: python@3.13 3.13.1 is already installed, it's just **not linke**d. To link this version, run: brew link python@3.13 Does the Xcode python and homebrew python share the same environment / space or are they somehow separate? If they are separate, how is toggling between the two performed? I ask because I would like to install the pyserial module so that I do not have to use it in a venv and use it with either the Xcode OR the homebrew python (preferable).
Asked by gatorback (1522 rep)
Feb 6, 2025, 02:20 AM
Last activity: Feb 6, 2025, 02:58 AM