Installing Python Pip on Mac OSX

Video is ready, Click Here to View ×


A quick video tutorial on installing pip on Mac OSX.

45 comments

  1. Just use
    Line[1]cd Applications/Python 3.6 (is my version yours may very)
    Line[2]pip3 install numpy ( anny Module should work not only numpy )

    On my mac it didn't want to download the modules until I had selected the correct directory (folder). Hope I could help

  2. If I install pip via Terminal as shown will the library also be available for the Official Python IDLE that I have installed? Is pip available globally on my Mac? I guess I will give this a go

  3. I tried to install CSV but it not allowed me and said :Could not find a version that satisfies the requirement CSV (from versions:) No matching distribution found for CSV

  4. I would like install — pip install Pyomo — but I have this problem

    Installing collected packages: ply, appdirs, nose, PyUtilib, Pyomo
    Exception:
    Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/ply'

    Hi,

    How can I fix

    Thanks

  5. FOR USERS OF PYTHON 3:

    If you have downloaded Python from the official website, then Pip should have come with your distribution. To install a package, simply type "python3.x -m pip install SomePackage" in the terminal. For example, I am using Python 3.6 and I want to download numpy. I would type, "python3.6 -m pip install numpy." I hope this helps!

  6. i got this error while installing pip
    ~ hardik$ sudo python get-pip.py
    :~ hardik$ curl http://bootstrap.pypa.io/get-pip > get-pip.py
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
    ~ hardik$ curl http://bootstrap.pypa.io/get-pip > get-pip.py
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
    :~ hardik$ curl http://bootstrap.pypa.io/get-pip > get-pip.py
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– 0:00:01 –:–:– 0^[ 0 0 0 0 0 0 0 0 –:–:– 0:00:04 –:–:– 0^[ 0 0 0 0 0 0 0 0 –:–:– 0:00:05 –:–:– 0
    :~ hardik$ curl http://bootstrap.pypa.io/get-pip > get-pip.py
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
    hardik$ curl http://bootstrap.pypa.io/get-pip > get-pip.py
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
    hardik$ sudo python get-pip.py
    :~ hardik$ sudo pip install requests
    sudo: pip: command not found
    :~ hardik$ python
    Python 2.7.10 (default, Jul 14 2015, 19:46:27)
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import requests
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named requests
    >>>

  7. Thanks Justin, I was looking at that file and completely puzzled, so went googling and found your informative video. This helps those of us who have El Capitan and thus have Python but lack pip which a Udemy Python class requires.

  8. Can you help figure out the issue?

    KeMas-MacBook-Pro:~ Suta$ sudo python get-pip.py
    Password:
    The directory '/Users/Suta/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/Users/Suta/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    /tmp/tmp0mwNXW/pip.zip/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
    /tmp/tmp0mwNXW/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    Requirement already up-to-date: pip in ./Library/Python/2.7/lib/python/site-packages
    KeMas-MacBook-Pro:~ Suta$ sudo pip install Theano
    sudo: pip: command not found
    KeMas-MacBook-Pro:~ Suta$

Leave a Reply

Your email address will not be published. Required fields are marked *