diff --git a/docs/Gems,-Eggs-and-Perl-Modules.md b/docs/Gems,-Eggs-and-Perl-Modules.md index 92afe2178e..6535bd3006 100644 --- a/docs/Gems,-Eggs-and-Perl-Modules.md +++ b/docs/Gems,-Eggs-and-Perl-Modules.md @@ -1,14 +1,13 @@ # Gems, Eggs and Perl Modules -On a fresh macOS installation there are three empty directories for +On a fresh macOS installation there are two empty directories for add-ons available to all users: * `/Library/Ruby` -* `/Library/Python` * `/Library/Perl` -You need sudo to install to these like so: `sudo gem install`, -`sudo easy_install` or `sudo cpan -i`. +You need sudo to install to these like so: `sudo gem install` +or `sudo cpan -i`. ## Python packages (eggs) without sudo using system Python diff --git a/docs/Homebrew-and-Python.md b/docs/Homebrew-and-Python.md index 9add826dc1..6a06fcc28b 100644 --- a/docs/Homebrew-and-Python.md +++ b/docs/Homebrew-and-Python.md @@ -6,7 +6,7 @@ Homebrew will install the necessary Python 3 version that is needed to make your ## Python 3 -Homebrew provides formulae for the newest and maintained releases of Python 3 (`python@3.y`) (https://devguide.python.org/versions/). +Homebrew provides formulae for the newest and maintained releases of Python 3 (`python@3.y`) (). We keep older `python@3.y` versions according to our [versioned formulae guidelines](https://docs.brew.sh/Versions). **Important:** Python may be upgraded to a newer version at any time. Consider using a version @@ -68,16 +68,12 @@ The reasoning for this location is to preserve your modules between (minor) upgr Some formulae provide Python bindings. -**Warning!** Python may crash (see [Common Issues](Common-Issues.md)) when you `import ` from a brewed Python if you ran `brew install ` against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. `pyside`, `wxwidgets`, `pyqt`, `pygobject3`, `opencv`, `vtk` and `boost-python`). - ## Policy for non-brewed Python bindings These should be installed via `pip install `. To discover, you can use . Starting with Python 3.12, we highly recommend you to use a separate virtualenv for this (see the section about [PEP 668](https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager) below). -**Note:** macOS's system Python does not provide `pip`. Follow the [pip documentation](https://pip.pypa.io/en/stable/installation/) to install it for your system Python if you would like it. - ## Brewed Python modules For brewed Python, modules installed with `pip` or `python3 setup.py install` will be installed to the `$(brew --prefix)/lib/pythonX.Y/site-packages` directory (explained above). Executable Python scripts will be in `$(brew --prefix)/bin`. @@ -88,11 +84,7 @@ Since the system Python may not know which compiler flags to set when building b CFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib" pip install ``` -**Warning!** When you `brew install` formulae that provide Python bindings, you should **not be in an active virtual environment.** - -Activate the virtualenv *after* you have installed your package with brew, or install brew's packages in a fresh terminal window. This will ensure Python modules are installed into Homebrew's `site-packages` and *not* into that of the virtual environment. - -## PEP 668 (Python@3.12) and virtualenvs +## PEP 668 (Python@3.12) and virtual environments Starting with Python@3.12, Homebrew follows [PEP 668](https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager).