Python3 running on Mac but no Pip3?


Python3 running on Mac but no Pip3?



I need to get pip3 running in my Mac terminal for a project. I have python3 installed, and I can run it, but when I try to run pip3 freeze, it says my command is not found.


pip3


python3


pip3 freeze



I thought it would be automatically installed when I installed Python3. I tried to sudo install it, but it still didn't do anything. What can I do?





what specific version of Python are you using?
– lmiguelvargasf
37 mins ago





Does pip exist? If it does, what does which pip tell you?
– juanpa.arrivillaga
22 mins ago


pip


which pip





How did you install Python 3? A python.org installer? Homebrew? Anaconda? Some other installer? Building the source and running make install?
– abarnert
4 mins ago


make install




3 Answers
3



Assuming you are using Python 3.4 or later in which pip is included by default, try the following command:


pip


python3 -m pip freeze



When you use the -m command-line flag, python will search sys.path for the named module and execute its contents as the __main__ module. (more here)


-m


sys.path


__main__



Besides brew install pip3, in case brew is not installed on your Mac, you can install pip3 via get_pip.py which can be found here. Assuming that python3 is already installed, cd to the directory where you saved get_pip.py and run the file with python3 get_pip.py. This should get pip3 installed on your machine.


brew install pip3


brew


pip3


get_pip.py


python3


cd


get_pip.py


python3 get_pip.py


pip3



You could try brew install pip3. Or check where pip is installed, that might point to Python 3's version.


brew install pip3


pip






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages