1

python2 is installed on every mac and I installed python3 and used it a lot with the standard libraries. Now I wanted to use pip3 as I did with pip and it says:

-bash: pip3: command not found

I downloaded get-pip.pyfound in StackOverflow's answers and with installing it I got:

Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages

In addition to that I tested with which pip3 and there was no output, just the new line with the normal shell. And with which pip there is the location output like I expected:

/usr/local/bin/pip

I installed python3 with the package and last month I installed brew. Maybe this created the conflict because I think I had use pip3for some libraries my installation of python3.

(What possibility do I have to use python3 without having to uninstall python2 and python3 because I need both of them and got the answer that it's no problem to install both of them?)

Thanks @phd for linking to another question. With

alias pip3='python3 -m pip'

in ~/.bash_profile I can use pip3 as used.

But I do want to know if there is still a place where pip3 is located in python3 and how I can find it?

Thanks a lot.

  • macOS 10.12.6 / python 2.7.10 and 3.6.4
  • which python>> /usr/bin/python
  • which python3>> /usr/local/bin/python3
bfontaine
  • 18,169
  • 13
  • 73
  • 107
TravelTrader
  • 398
  • 4
  • 15
  • Maybe `pip3.6` or `pip-3.6`? I'm not familiar with Homebrew or get-pip. – sudo Feb 26 '18 at 18:57
  • No but thanks for your fast comment. – TravelTrader Feb 26 '18 at 19:18
  • Possible duplicate of [How to install PIP on Python 3.6?](https://stackoverflow.com/questions/43304612/how-to-install-pip-on-python-3-6) – phd Feb 26 '18 at 20:34
  • Try doing `locate pip | grep /usr/local/bin`... – l'L'l Feb 26 '18 at 21:29
  • @phd I'm sorry, I searched a lot before writing but your link seems to lead to a solution: I created an alias for `pip3` to `python3 -m pip` and now I can work with it as used. Is there no real pip3 in python3? @l'L'l The command leads to an error with the proposed solution of typing `sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist`. With no output there immediately is a prompt and your command does still not work. What about the location of pip3? Is there a possibility to ask additional things to a question at stackoverflow? – TravelTrader Feb 27 '18 at 04:51
  • There can be a `pip3` command on your system, but that depends how you installed Python 3 (these days, they tend to come together). So your installation may decided not to install it for you. Your alias, however, is totally fine, as is using `python -m pip3`, so there really is no need for a separate `pip3` command. Or phrased differently: why do you want one if it's already working fine? –  Feb 27 '18 at 05:13
  • @Evert Thank you. And thank you to all comments. – TravelTrader Feb 27 '18 at 19:15

0 Answers0