'Launching Pip3 install package_name on macOS

I have installed homebrew this morning and I added the path in /Users/$USER/.homebrew/bin since this is the correct path for those who care about folder permissions in /usr/local

Taken from these sources:

  1. applehelpwriter, which has been taken down lately

  2. THN post

Now I launched pip3 install moodle-dl but the default path was first /usr/bin/pip3 where command line tools were installed and it failed since the pip3 version from python 3.8.9 was not up to date.

Since I changed the default $PATH in my .zshrc with:

export PATH=/Users/$USER/.homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I managed to solve the issue, with the bin folder inside ~/.homebrew/bin served first, but I'd like to find and purge all the binaries/caches which were used by the default pip3 which came along with the Command Line tools for Xcode.

So far, I've only found that pip3 from /usr/bin/pip3 wrote to /Users/$USER/Library/Caches/pip and to /Users/$USER/Library/Python, is there any other directory that I'm unaware of? Are there some man pages which explain what directories are touched by the Command line tools for Xcode?

If you've read so far, thank you for your patience.



Solution 1:[1]

Possibly try pip itself to clear things out.

See examples and usage: https://stackoverflow.com/a/61762308/1931274 (h/t to pradyunsg in their comment on another question)

Just be sure to use pip3 under /usr/bin

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jma