I believe there is the simpler solution to your problem the Homebrew's Python on macOS that definitely will not break your normal pip operations.
All you need to do is to just create the
setup.cfg file at your root directory of the project, usually where the main
__init__.py or executable py file is present. So if your root folder of the project is:
/path/to/my/project/ then simply create the
setup.cfg file in there and put your magic words inside as below :
Now you will be able to run your pip's commands for that folder as below:
pip install package -t /path/to/my/project/
The command will run error free for that folder only. Just copy your
setup.cfg to the other projects that you might have. And no need to write the
.pydistutils.cfg on the home directory.
After you are done with installing your modules, you can safely remove