-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brew leads to mixed up python paths #260
Comments
If you want to always have system python and pip being used when using an interactive shell: You can add them to the beginning of PATH as part of your bashrc. They will then have precedence over the python installed by brew |
Ok so I just tested this. If we do a This seems like a good default to go with, it'd be weird if python behaved different on a ublue system than a fedora one. |
we can also put Brew at the end of PATH so we defer to system binaries. The unlink will relink after the next upgrade I believe |
Putting it at the end of the path means if I brew install Python for myself I won't get it as expected. If a brew installed software requires Python brew shouldn't be doing the brew link for Python that feels like a brew issue |
Using brew to install a python program also installs python3 and pip3 into
/home/linuxbrew/.linuxbrew/
.But there's also a python(3) and pip(3) on the host.
The problem is that when the user uses the commands
python
orpip
, it defaults to the programs installed on the hostand when the user uses
python3
orpip3
the programs of the brew install get used.So if you want to use python without spinning up a distrobox (which should be possible), the different paths can lead to confusion. For example:
pip
python3
The brew python should not be in PATH as it is just a dependency of brew programs and should not be used directly.
pip3 install
also tells you that this pip (the brew one) should not be used.The text was updated successfully, but these errors were encountered: