I would like to ask how to install python on Mac through Homebrew. Homebrew is a package manager for Mac.
Specifically I would like to link python to /usr/local/bin/ and not to /usr/bin/ where it is linked by default.
The reason to do this is that I want then to install a virtual environment which will provide me the libraries of python (see: https://www.learnopencv.com/install-opencv3-on-macos/). Otherwise the virtual environment cannot be installed as source /usr/local/bin/virtualenvwrapper.sh in the bash_profile cannot be read.
Do you have any idea how can I do this?
In brief, I want the output to which python at terminal to be /usr/local/bin/python and not /usr/bin/python as it is by default.
UPDATE:
I applied the changes that TomD described below (I hope correctly!) but now which python has not output: is not /usr/local/bin/python as I would like (not even /usr/bin/python).
So why finally python from 'cellar' is not linked to /usr/local/bin/python?