How to install pip with Python 3?











up vote
407
down vote

favorite
89












I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.



How can I install pip with Python 3?










share|improve this question






















  • related: easy way to install distribute/pip/virtualenv. It supports Python 3 too.
    – jfs
    Nov 25 '12 at 19:28








  • 2




    @deamon: you may want to reconsider the accepted answer as distribute is deprecated and another answer solves the problem.
    – WoJ
    Jan 29 '15 at 7:59










  • Imho this is best than the accepted answer : stackoverflow.com/questions/17443354/…
    – Loïc
    Oct 30 at 21:04















up vote
407
down vote

favorite
89












I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.



How can I install pip with Python 3?










share|improve this question






















  • related: easy way to install distribute/pip/virtualenv. It supports Python 3 too.
    – jfs
    Nov 25 '12 at 19:28








  • 2




    @deamon: you may want to reconsider the accepted answer as distribute is deprecated and another answer solves the problem.
    – WoJ
    Jan 29 '15 at 7:59










  • Imho this is best than the accepted answer : stackoverflow.com/questions/17443354/…
    – Loïc
    Oct 30 at 21:04













up vote
407
down vote

favorite
89









up vote
407
down vote

favorite
89






89





I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.



How can I install pip with Python 3?










share|improve this question













I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.



How can I install pip with Python 3?







python python-3.x packages setuptools pip






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 5 '11 at 18:58









deamon

36.3k85240367




36.3k85240367












  • related: easy way to install distribute/pip/virtualenv. It supports Python 3 too.
    – jfs
    Nov 25 '12 at 19:28








  • 2




    @deamon: you may want to reconsider the accepted answer as distribute is deprecated and another answer solves the problem.
    – WoJ
    Jan 29 '15 at 7:59










  • Imho this is best than the accepted answer : stackoverflow.com/questions/17443354/…
    – Loïc
    Oct 30 at 21:04


















  • related: easy way to install distribute/pip/virtualenv. It supports Python 3 too.
    – jfs
    Nov 25 '12 at 19:28








  • 2




    @deamon: you may want to reconsider the accepted answer as distribute is deprecated and another answer solves the problem.
    – WoJ
    Jan 29 '15 at 7:59










  • Imho this is best than the accepted answer : stackoverflow.com/questions/17443354/…
    – Loïc
    Oct 30 at 21:04
















related: easy way to install distribute/pip/virtualenv. It supports Python 3 too.
– jfs
Nov 25 '12 at 19:28






related: easy way to install distribute/pip/virtualenv. It supports Python 3 too.
– jfs
Nov 25 '12 at 19:28






2




2




@deamon: you may want to reconsider the accepted answer as distribute is deprecated and another answer solves the problem.
– WoJ
Jan 29 '15 at 7:59




@deamon: you may want to reconsider the accepted answer as distribute is deprecated and another answer solves the problem.
– WoJ
Jan 29 '15 at 7:59












Imho this is best than the accepted answer : stackoverflow.com/questions/17443354/…
– Loïc
Oct 30 at 21:04




Imho this is best than the accepted answer : stackoverflow.com/questions/17443354/…
– Loïc
Oct 30 at 21:04












19 Answers
19






active

oldest

votes

















up vote
526
down vote



accepted










edit: Manual installation and use of setuptools is not the standard process anymore.



If you're running Python 2.7.9+ or Python 3.4+



Congrats, you should already have pip installed. If you do not, read onward.



If you're running a Unix-like System



You can usually install the package for pip through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason.



Instructions for some of the more common distros follow.



Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 2.x



Run the following command from a terminal:



sudo apt-get install python-pip 


Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 3.x



Run the following command from a terminal:



sudo apt-get install python3-pip


Note:

On a fresh Debian/Ubuntu install, the package may not be found until you do:



sudo apt-get update


Installing pip on CentOS 7 for Python 2.x



On CentOS 7, you have to install setup tools first, and then use that to install pip, as there is no direct package for it.



sudo yum install python-setuptools
sudo easy_install pip


Installing pip on CentOS 7 for Python 3.x



Assuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install pip.



# First command requires you to have enabled EPEL for CentOS7
sudo yum install python34-setuptools
sudo easy_install pip


If your Unix/Linux distro doesn't have it in package repos



Install using the manual way detailed below.



The manual way



If you want to do it the manual way, the now-recommended method is to install using the get-pip.py script from pip's installation instructions.




Install pip



To install pip, securely download get-pip.py



Then run the following (which may require administrator access):



python get-pip.py 


If setuptools is not already installed, get-pip.py will install setuptools for you.







share|improve this answer



















  • 13




    It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
    – talljosh
    Apr 30 '12 at 4:02






  • 2




    @TylerCrompton - easy_install pip.
    – wkl
    Feb 27 '13 at 16:11






  • 18




    distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
    – wegry
    Aug 3 '13 at 22:07






  • 4




    From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
    – WoJ
    Jan 29 '15 at 7:22






  • 5




    Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
    – user1214678
    Apr 9 '16 at 18:54


















up vote
189
down vote













I was able to install pip for python 3 on Ubuntu just by running sudo apt-get install python3-pip.






share|improve this answer

















  • 17




    Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
    – yoniLavi
    Jan 30 '13 at 15:19








  • 28




    Unable to locate package python3-pip. Has it been renamed?
    – Dennis
    Apr 3 '13 at 1:45








  • 8




    Are you using Ubuntu 12.04 LTS? It's not available there.
    – Anonymous Coward
    Jul 10 '13 at 14:23






  • 7




    +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
    – ehime
    Sep 27 '13 at 20:52








  • 4




    seems to be just pip3 now
    – Xaser
    Sep 8 '16 at 21:58


















up vote
80
down vote













Python 3.4+ and Python 2.7.9+



Good news! Python 3.4 (released March 2014) ships with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Nodejs, Haskell, Perl, Go--almost every other contemporary language with a majority open-source community. Thank you Python.



Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this at Does Python have a package/module management system?



Alas for everyone using an earlier Python. Manual instructions follow.



Python ≤ 2.7.8 and Python ≤ 3.3



Follow my detailed instructions at https://stackoverflow.com/a/12476379/284795 . Essentially



Official instructions



Per https://pip.pypa.io/en/stable/installing.html



Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt.



python get-pip.py


You possibly need an administrator command prompt to do this. Follow http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx



For me, this installed Pip at C:Python27Scriptspip.exe. Find pip.exe on your computer, then add its folder (eg. C:Python27Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:



pip install httpie


There you go (hopefully)!






share|improve this answer



















  • 1




    +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
    – wim
    May 7 '13 at 6:14






  • 2




    Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
    – Matthieu Riegler
    Feb 24 '14 at 16:24










  • After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
    – Pei
    Jun 26 '14 at 20:07












  • By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
    – lfx_cool
    Aug 2 '14 at 11:25






  • 1




    I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
    – treesAreEverywhere
    Aug 23 '14 at 12:08




















up vote
46
down vote













For Ubuntu 12.04 or older,



sudo apt-get install python3-pip


won't work. Instead, use:



sudo apt-get install python3-setuptools ca-certificates
sudo easy_install3 pip





share|improve this answer























  • worked on Debian (Jessie)
    – ksaylor11
    May 4 '15 at 0:43










  • worked on ubuntu 12.04 .. thnx.. :)
    – MohK
    Jul 22 '16 at 11:37










  • @Duc Pharm Second answer worked on Ubuntu 16.10
    – vinayakumarnk
    Mar 22 at 12:16


















up vote
32
down vote













Update 2015-01-20:



As per https://pip.pypa.io/en/latest/installing.html the current way is:



wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py


I think that should work for any version





Original Answer:



wget http://python-distribute.org/distribute_setup.py
python distribute_setup.py
easy_install pip





share|improve this answer



















  • 1




    I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
    – MCP
    Jul 13 '13 at 17:54










  • Thanks, worked for me on Python 3.3.4
    – Brian Burns
    Apr 8 '14 at 18:33






  • 2




    wget: unable to resolve host address ‘python-distribute.org’
    – newguy
    Dec 8 '14 at 5:47










  • wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
    – j3ffyang
    Jul 20 at 9:45




















up vote
17
down vote













python3 -m ensurepip


I'm not sure when exactly this was introduced, but it's installed pip3 for me when it didn't already exist.






share|improve this answer

















  • 1




    Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
    – Antwane
    May 3 '16 at 8:31










  • This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
    – not2qubit
    Mar 24 '17 at 23:10










  • This worked fantastically!
    – turiyag
    Mar 21 at 2:59


















up vote
17
down vote













if you're using python 3.4+



just type:



python3 -m pip





share|improve this answer





















  • Works for me thanks
    – Antoine
    Dec 13 '16 at 0:32










  • On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
    – turiyag
    Mar 21 at 2:58




















up vote
12
down vote













Single Python in system



To install packages in Python always follow these steps:




  1. If the package is for python 2.x: sudo python -m pip install [package]

  2. If the package is for python 3.x: sudo python3 -m pip install [package]


Note: This is assuming no alias is set for python



Through this method, there will be no confusion regarding which python version is receiving the package.



Multiple Pythons



Say you have python3 ↔ python3.6 and python3.7 ↔ python3.7




  1. To install for python3.6: sudo python3 -m pip install [package]

  2. To instal for python3.7: sudo python3.7 -m pip install [package]


This is essentially the same method as shown previously.



Note 1



How to find which python, your python3 command spawns:



ganesh@Ganesh:~$ python3 # Type in terminal
Python 3.6.6 (default, Sep 12 2018, 18:26:19) # Your python3 version
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


Notice python 3.6.6 in the second line.



Note 2



Change what python3 or python points to: https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3






share|improve this answer























  • Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
    – Christopher Hunter
    Oct 16 at 21:41


















up vote
10
down vote













Older version of Homebrew



If you are on macOS, use homebrew.



brew install python3 # this installs python only
brew postinstall python3 # this command installs pip


Also note that you should check the console if the install finished successfully. Sometimes it doesn't (e.g. an error due to ownership), but people simply overlook the log.





UPDATED - Homebrew version after 1.5



According to the official Homebrew page:




On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.




So to install Python 3, run the following command:



brew install python3


Then, the pip is installed automatically, and you can install any package by pip install <package>.






share|improve this answer






























    up vote
    4
    down vote













    If you use several different versions of python try using virtualenv http://www.virtualenv.org/en/latest/virtualenv.html#installation



    With the advantage of pip for each local environment.



    Then install a local environment in the current directory by:



    virtualenv -p /usr/local/bin/python3.3 ENV --verbose


    Note that you specify the path to a python binary you have installed on your system.



    Then there are now an local pythonenvironment in that folder. ./ENV



    Now there should be ./ENV/pip-3.3



    use
    ./ENV/pip-3.3 freeze to list the local installed libraries.



    use ./ENV/pip-3.3 install packagename to install at the local environment.



    use ./ENV/python3.3 pythonfile.py to run your python script.






    share|improve this answer




























      up vote
      4
      down vote













      Here is my way to solve this problem at ubuntu 12.04:



      sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev


      Then install the python3 from source code:



      wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
      tar xvf Python-3.4.0.tar.xz
      cd Python-3.4.0
      ./configure
      make
      make test
      sudo make install


      When you finished installing all of them, pip3 will get installed automatically.






      share|improve this answer





















      • ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
        – Mona Jalal
        Aug 4 '16 at 22:04


















      up vote
      3
      down vote













      This is what I did on OS X Mavericks to get this to work.



      Firstly, have brew installed



      Install python 3.4



      brew install python3


      Then I get the latest version of distribute:



      wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a

      unzip distribute-0.7.3.zip
      cd distribute-0.7.3
      sudo setup.py install
      sudo easy_install-3.4 pip
      sudo pip3.4 install virtualenv
      sudo pip3.4 install virtualenvwrapper

      mkvirtualenv py3

      python --version
      Python 3.4.1


      I hope this helps.






      share|improve this answer





















      • This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
        – hamx0r
        Oct 21 '15 at 1:15










      • @hamx0r you would run python3 or you could symlink it:
        – silverdagger
        Oct 22 '15 at 4:55


















      up vote
      2
      down vote













      For python3 try this:



      wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python


      The good thing is that It will also detect what version of python you have (even if it's an environment of python in your custom location).
      After this you can proceed normally with (for example)



      pip install numpy


      source:
      https://pypi.python.org/pypi/setuptools/1.1.6#upgrading-from-setuptools-0-6






      share|improve this answer




























        up vote
        2
        down vote













        Assuming you are in a highly restricted computer env (such as myself) without root access or ability to install packages...



        I had never setup a fresh/standalone/raw/non-root instance of Python+virtualenv before this post. I had do quite a bit of Googling to make this work.




        1. Decide if you are using python (python2) or python3 and set your PATH correctly. (I am strictly a python3 user.) All commands below can substitute python3 for python if you are python2 user.

        2. wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-x.y.z.tar.gz

        3. tar -xzvf virtualenv-x.y.z.tar.gz

        4. python3 virtualenv-x.y.z/virtualenv.py --python $(which python3) /path/to/new/virtualenv


        5. source /path/to/new/virtualenv/bin/activate

          • Assumes you are using a Bourne-compatible shell, e.g., bash

          • Brilliantly, this virtualenv package includes a standalone version of pip and setuptools that are auto-magically installed into each new virtualenv. This solves the chicken and egg problem.

          • You may want to create an alias (or update your ~/.bashrc, etc.) for this final command to activate the python virtualenv during each login. It can be a pain to remember all these paths and commands.



        6. Check your version of python now: which python3 should give: /path/to/new/virtualenv/bin/python3

        7. Check pip is also available in the virtualenv via which pip... should give: /path/to/new/virtualenv/bin/pip


        Then... pip, pip, pip!



        Final tip to newbie Pythoneers: You don't think you need virtualenv when you start, but you will be happy to have it later. Helps with "what if" installation / upgrade scenarios for open source / shared packages.



        Ref: https://virtualenv.pypa.io/en/latest/installation.html






        share|improve this answer






























          up vote
          1
          down vote













          What’s New In Python 3.4



          pip should always be available



          By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.



          https://docs.python.org/3/whatsnew/3.4.html#whatsnew-pep-453



          so if you have python 3.4 installed, you can just: sudo pip3 install xxx






          share|improve this answer

















          • 1




            pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
            – Water
            Jan 10 '16 at 16:16




















          up vote
          1
          down vote













          To install pip, securely download get-pip.py.



          Then run the following:



          python get-pip.py



          Be cautious if you're using a Python install that's managed by your
          operating system or another package manager. get-pip.py does not
          coordinate with those tools, and may leave your system in an
          inconsistent state.




          Refer: PIP Installation






          share|improve this answer




























            up vote
            1
            down vote













            And for Windows 8.1/10 OS Users just open cmd (command prompt)



            write this : C:Users%USERNAME%AppDataLocalProgramsPythonPython36-32Scripts



            then



            just write this : pip3 install {name of package}



            Hint: the location of folder Python36-32 may get different for new python 3.x versions






            share|improve this answer




























              up vote
              0
              down vote













              If your Linux distro came with Python already installed, you should be able to install PIP using your system’s package manager. This is preferable since system-installed versions of Python do not play nicely with the get-pip.py script used on Windows and Mac.



              Advanced Package Tool (Python 2.x)



              sudo apt-get install python-pip


              Advanced Package Tool (Python 3.x)



              sudo apt-get install python3-pip


              pacman Package Manager (Python 2.x)



              sudo pacman -S python2-pip


              pacman Package Manager (Python 3.x)



              sudo pacman -S python-pip


              Yum Package Manager (Python 2.x)



              sudo yum upgrade python-setuptools
              sudo yum install python-pip python-wheel


              Yum Package Manager (Python 3.x)



              sudo yum install python3 python3-wheel


              Dandified Yum (Python 2.x)



              sudo dnf upgrade python-setuptools
              sudo dnf install python-pip python-wheel


              Dandified Yum (Python 3.x)



              sudo dnf install python3 python3-wheel


              Zypper Package Manager (Python 2.x)



              sudo zypper install python-pip python-setuptools python-wheel


              Zypper Package Manager (Python 3.x)



              sudo zypper install python3-pip python3-setuptools python3-wheel





              share|improve this answer




























                up vote
                0
                down vote













                Below video is how I did in cygwin:



                https://asciinema.org/a/hSu4kmJ6wb7b2UiuvxiXqtgGK



                There is weirdness in python's pip, pip2, pip3 craziness. In crazy situations like these, it is imperative that there is less talking or explanations, but instead demonstrate things out.






                share|improve this answer




















                  protected by Aniket Thakur Jan 7 at 4:38



                  Thank you for your interest in this question.
                  Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                  Would you like to answer one of these unanswered questions instead?














                  19 Answers
                  19






                  active

                  oldest

                  votes








                  19 Answers
                  19






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes








                  up vote
                  526
                  down vote



                  accepted










                  edit: Manual installation and use of setuptools is not the standard process anymore.



                  If you're running Python 2.7.9+ or Python 3.4+



                  Congrats, you should already have pip installed. If you do not, read onward.



                  If you're running a Unix-like System



                  You can usually install the package for pip through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason.



                  Instructions for some of the more common distros follow.



                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 2.x



                  Run the following command from a terminal:



                  sudo apt-get install python-pip 


                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 3.x



                  Run the following command from a terminal:



                  sudo apt-get install python3-pip


                  Note:

                  On a fresh Debian/Ubuntu install, the package may not be found until you do:



                  sudo apt-get update


                  Installing pip on CentOS 7 for Python 2.x



                  On CentOS 7, you have to install setup tools first, and then use that to install pip, as there is no direct package for it.



                  sudo yum install python-setuptools
                  sudo easy_install pip


                  Installing pip on CentOS 7 for Python 3.x



                  Assuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install pip.



                  # First command requires you to have enabled EPEL for CentOS7
                  sudo yum install python34-setuptools
                  sudo easy_install pip


                  If your Unix/Linux distro doesn't have it in package repos



                  Install using the manual way detailed below.



                  The manual way



                  If you want to do it the manual way, the now-recommended method is to install using the get-pip.py script from pip's installation instructions.




                  Install pip



                  To install pip, securely download get-pip.py



                  Then run the following (which may require administrator access):



                  python get-pip.py 


                  If setuptools is not already installed, get-pip.py will install setuptools for you.







                  share|improve this answer



















                  • 13




                    It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
                    – talljosh
                    Apr 30 '12 at 4:02






                  • 2




                    @TylerCrompton - easy_install pip.
                    – wkl
                    Feb 27 '13 at 16:11






                  • 18




                    distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
                    – wegry
                    Aug 3 '13 at 22:07






                  • 4




                    From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
                    – WoJ
                    Jan 29 '15 at 7:22






                  • 5




                    Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
                    – user1214678
                    Apr 9 '16 at 18:54















                  up vote
                  526
                  down vote



                  accepted










                  edit: Manual installation and use of setuptools is not the standard process anymore.



                  If you're running Python 2.7.9+ or Python 3.4+



                  Congrats, you should already have pip installed. If you do not, read onward.



                  If you're running a Unix-like System



                  You can usually install the package for pip through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason.



                  Instructions for some of the more common distros follow.



                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 2.x



                  Run the following command from a terminal:



                  sudo apt-get install python-pip 


                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 3.x



                  Run the following command from a terminal:



                  sudo apt-get install python3-pip


                  Note:

                  On a fresh Debian/Ubuntu install, the package may not be found until you do:



                  sudo apt-get update


                  Installing pip on CentOS 7 for Python 2.x



                  On CentOS 7, you have to install setup tools first, and then use that to install pip, as there is no direct package for it.



                  sudo yum install python-setuptools
                  sudo easy_install pip


                  Installing pip on CentOS 7 for Python 3.x



                  Assuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install pip.



                  # First command requires you to have enabled EPEL for CentOS7
                  sudo yum install python34-setuptools
                  sudo easy_install pip


                  If your Unix/Linux distro doesn't have it in package repos



                  Install using the manual way detailed below.



                  The manual way



                  If you want to do it the manual way, the now-recommended method is to install using the get-pip.py script from pip's installation instructions.




                  Install pip



                  To install pip, securely download get-pip.py



                  Then run the following (which may require administrator access):



                  python get-pip.py 


                  If setuptools is not already installed, get-pip.py will install setuptools for you.







                  share|improve this answer



















                  • 13




                    It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
                    – talljosh
                    Apr 30 '12 at 4:02






                  • 2




                    @TylerCrompton - easy_install pip.
                    – wkl
                    Feb 27 '13 at 16:11






                  • 18




                    distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
                    – wegry
                    Aug 3 '13 at 22:07






                  • 4




                    From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
                    – WoJ
                    Jan 29 '15 at 7:22






                  • 5




                    Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
                    – user1214678
                    Apr 9 '16 at 18:54













                  up vote
                  526
                  down vote



                  accepted







                  up vote
                  526
                  down vote



                  accepted






                  edit: Manual installation and use of setuptools is not the standard process anymore.



                  If you're running Python 2.7.9+ or Python 3.4+



                  Congrats, you should already have pip installed. If you do not, read onward.



                  If you're running a Unix-like System



                  You can usually install the package for pip through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason.



                  Instructions for some of the more common distros follow.



                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 2.x



                  Run the following command from a terminal:



                  sudo apt-get install python-pip 


                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 3.x



                  Run the following command from a terminal:



                  sudo apt-get install python3-pip


                  Note:

                  On a fresh Debian/Ubuntu install, the package may not be found until you do:



                  sudo apt-get update


                  Installing pip on CentOS 7 for Python 2.x



                  On CentOS 7, you have to install setup tools first, and then use that to install pip, as there is no direct package for it.



                  sudo yum install python-setuptools
                  sudo easy_install pip


                  Installing pip on CentOS 7 for Python 3.x



                  Assuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install pip.



                  # First command requires you to have enabled EPEL for CentOS7
                  sudo yum install python34-setuptools
                  sudo easy_install pip


                  If your Unix/Linux distro doesn't have it in package repos



                  Install using the manual way detailed below.



                  The manual way



                  If you want to do it the manual way, the now-recommended method is to install using the get-pip.py script from pip's installation instructions.




                  Install pip



                  To install pip, securely download get-pip.py



                  Then run the following (which may require administrator access):



                  python get-pip.py 


                  If setuptools is not already installed, get-pip.py will install setuptools for you.







                  share|improve this answer














                  edit: Manual installation and use of setuptools is not the standard process anymore.



                  If you're running Python 2.7.9+ or Python 3.4+



                  Congrats, you should already have pip installed. If you do not, read onward.



                  If you're running a Unix-like System



                  You can usually install the package for pip through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason.



                  Instructions for some of the more common distros follow.



                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 2.x



                  Run the following command from a terminal:



                  sudo apt-get install python-pip 


                  Installing on Debian (Wheezy and newer) and Ubuntu (Trusty Tahr and newer) for Python 3.x



                  Run the following command from a terminal:



                  sudo apt-get install python3-pip


                  Note:

                  On a fresh Debian/Ubuntu install, the package may not be found until you do:



                  sudo apt-get update


                  Installing pip on CentOS 7 for Python 2.x



                  On CentOS 7, you have to install setup tools first, and then use that to install pip, as there is no direct package for it.



                  sudo yum install python-setuptools
                  sudo easy_install pip


                  Installing pip on CentOS 7 for Python 3.x



                  Assuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install pip.



                  # First command requires you to have enabled EPEL for CentOS7
                  sudo yum install python34-setuptools
                  sudo easy_install pip


                  If your Unix/Linux distro doesn't have it in package repos



                  Install using the manual way detailed below.



                  The manual way



                  If you want to do it the manual way, the now-recommended method is to install using the get-pip.py script from pip's installation instructions.




                  Install pip



                  To install pip, securely download get-pip.py



                  Then run the following (which may require administrator access):



                  python get-pip.py 


                  If setuptools is not already installed, get-pip.py will install setuptools for you.








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jul 26 at 19:43









                  Bruno Bronosky

                  33k47580




                  33k47580










                  answered Jul 5 '11 at 19:01









                  wkl

                  55.4k11127158




                  55.4k11127158








                  • 13




                    It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
                    – talljosh
                    Apr 30 '12 at 4:02






                  • 2




                    @TylerCrompton - easy_install pip.
                    – wkl
                    Feb 27 '13 at 16:11






                  • 18




                    distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
                    – wegry
                    Aug 3 '13 at 22:07






                  • 4




                    From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
                    – WoJ
                    Jan 29 '15 at 7:22






                  • 5




                    Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
                    – user1214678
                    Apr 9 '16 at 18:54














                  • 13




                    It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
                    – talljosh
                    Apr 30 '12 at 4:02






                  • 2




                    @TylerCrompton - easy_install pip.
                    – wkl
                    Feb 27 '13 at 16:11






                  • 18




                    distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
                    – wegry
                    Aug 3 '13 at 22:07






                  • 4




                    From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
                    – WoJ
                    Jan 29 '15 at 7:22






                  • 5




                    Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
                    – user1214678
                    Apr 9 '16 at 18:54








                  13




                  13




                  It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
                  – talljosh
                  Apr 30 '12 at 4:02




                  It's worth noting that the distribute install script has a --user flag that will install distribute just for the current user.
                  – talljosh
                  Apr 30 '12 at 4:02




                  2




                  2




                  @TylerCrompton - easy_install pip.
                  – wkl
                  Feb 27 '13 at 16:11




                  @TylerCrompton - easy_install pip.
                  – wkl
                  Feb 27 '13 at 16:11




                  18




                  18




                  distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
                  – wegry
                  Aug 3 '13 at 22:07




                  distribute has since been superseded by [setup_tools] (pypi.python.org/pypi/setuptools).
                  – wegry
                  Aug 3 '13 at 22:07




                  4




                  4




                  From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
                  – WoJ
                  Jan 29 '15 at 7:22




                  From pythonhosted.org/distribute: "Distribute is a deprecated fork of the Setuptools project.". It is abandoned and not being maintained anymore.
                  – WoJ
                  Jan 29 '15 at 7:22




                  5




                  5




                  Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
                  – user1214678
                  Apr 9 '16 at 18:54




                  Pip's website says that it already comes with Python 3.4+ if you downloaded from python.org. However, when I type pip on terminal, I get command not found. So I decided to go through the python3's install docs again, where it mentions that python and pip should be accessed using the commands python3 and pip3 instead. This is not obvious from the documentation on either site.
                  – user1214678
                  Apr 9 '16 at 18:54












                  up vote
                  189
                  down vote













                  I was able to install pip for python 3 on Ubuntu just by running sudo apt-get install python3-pip.






                  share|improve this answer

















                  • 17




                    Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
                    – yoniLavi
                    Jan 30 '13 at 15:19








                  • 28




                    Unable to locate package python3-pip. Has it been renamed?
                    – Dennis
                    Apr 3 '13 at 1:45








                  • 8




                    Are you using Ubuntu 12.04 LTS? It's not available there.
                    – Anonymous Coward
                    Jul 10 '13 at 14:23






                  • 7




                    +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
                    – ehime
                    Sep 27 '13 at 20:52








                  • 4




                    seems to be just pip3 now
                    – Xaser
                    Sep 8 '16 at 21:58















                  up vote
                  189
                  down vote













                  I was able to install pip for python 3 on Ubuntu just by running sudo apt-get install python3-pip.






                  share|improve this answer

















                  • 17




                    Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
                    – yoniLavi
                    Jan 30 '13 at 15:19








                  • 28




                    Unable to locate package python3-pip. Has it been renamed?
                    – Dennis
                    Apr 3 '13 at 1:45








                  • 8




                    Are you using Ubuntu 12.04 LTS? It's not available there.
                    – Anonymous Coward
                    Jul 10 '13 at 14:23






                  • 7




                    +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
                    – ehime
                    Sep 27 '13 at 20:52








                  • 4




                    seems to be just pip3 now
                    – Xaser
                    Sep 8 '16 at 21:58













                  up vote
                  189
                  down vote










                  up vote
                  189
                  down vote









                  I was able to install pip for python 3 on Ubuntu just by running sudo apt-get install python3-pip.






                  share|improve this answer












                  I was able to install pip for python 3 on Ubuntu just by running sudo apt-get install python3-pip.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 25 '12 at 19:22









                  Jonathan

                  4,35452451




                  4,35452451








                  • 17




                    Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
                    – yoniLavi
                    Jan 30 '13 at 15:19








                  • 28




                    Unable to locate package python3-pip. Has it been renamed?
                    – Dennis
                    Apr 3 '13 at 1:45








                  • 8




                    Are you using Ubuntu 12.04 LTS? It's not available there.
                    – Anonymous Coward
                    Jul 10 '13 at 14:23






                  • 7




                    +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
                    – ehime
                    Sep 27 '13 at 20:52








                  • 4




                    seems to be just pip3 now
                    – Xaser
                    Sep 8 '16 at 21:58














                  • 17




                    Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
                    – yoniLavi
                    Jan 30 '13 at 15:19








                  • 28




                    Unable to locate package python3-pip. Has it been renamed?
                    – Dennis
                    Apr 3 '13 at 1:45








                  • 8




                    Are you using Ubuntu 12.04 LTS? It's not available there.
                    – Anonymous Coward
                    Jul 10 '13 at 14:23






                  • 7




                    +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
                    – ehime
                    Sep 27 '13 at 20:52








                  • 4




                    seems to be just pip3 now
                    – Xaser
                    Sep 8 '16 at 21:58








                  17




                  17




                  Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
                  – yoniLavi
                  Jan 30 '13 at 15:19






                  Then use pip-3.2 install (replace 3.2 with your version) to install the packages - also see stackoverflow.com/questions/10763440/…
                  – yoniLavi
                  Jan 30 '13 at 15:19






                  28




                  28




                  Unable to locate package python3-pip. Has it been renamed?
                  – Dennis
                  Apr 3 '13 at 1:45






                  Unable to locate package python3-pip. Has it been renamed?
                  – Dennis
                  Apr 3 '13 at 1:45






                  8




                  8




                  Are you using Ubuntu 12.04 LTS? It's not available there.
                  – Anonymous Coward
                  Jul 10 '13 at 14:23




                  Are you using Ubuntu 12.04 LTS? It's not available there.
                  – Anonymous Coward
                  Jul 10 '13 at 14:23




                  7




                  7




                  +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
                  – ehime
                  Sep 27 '13 at 20:52






                  +1 Confirmed working on ubuntu 13.04 after sudo apt-get install -y python3.3 and using type pip3
                  – ehime
                  Sep 27 '13 at 20:52






                  4




                  4




                  seems to be just pip3 now
                  – Xaser
                  Sep 8 '16 at 21:58




                  seems to be just pip3 now
                  – Xaser
                  Sep 8 '16 at 21:58










                  up vote
                  80
                  down vote













                  Python 3.4+ and Python 2.7.9+



                  Good news! Python 3.4 (released March 2014) ships with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Nodejs, Haskell, Perl, Go--almost every other contemporary language with a majority open-source community. Thank you Python.



                  Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this at Does Python have a package/module management system?



                  Alas for everyone using an earlier Python. Manual instructions follow.



                  Python ≤ 2.7.8 and Python ≤ 3.3



                  Follow my detailed instructions at https://stackoverflow.com/a/12476379/284795 . Essentially



                  Official instructions



                  Per https://pip.pypa.io/en/stable/installing.html



                  Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt.



                  python get-pip.py


                  You possibly need an administrator command prompt to do this. Follow http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx



                  For me, this installed Pip at C:Python27Scriptspip.exe. Find pip.exe on your computer, then add its folder (eg. C:Python27Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:



                  pip install httpie


                  There you go (hopefully)!






                  share|improve this answer



















                  • 1




                    +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
                    – wim
                    May 7 '13 at 6:14






                  • 2




                    Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
                    – Matthieu Riegler
                    Feb 24 '14 at 16:24










                  • After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
                    – Pei
                    Jun 26 '14 at 20:07












                  • By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
                    – lfx_cool
                    Aug 2 '14 at 11:25






                  • 1




                    I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
                    – treesAreEverywhere
                    Aug 23 '14 at 12:08

















                  up vote
                  80
                  down vote













                  Python 3.4+ and Python 2.7.9+



                  Good news! Python 3.4 (released March 2014) ships with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Nodejs, Haskell, Perl, Go--almost every other contemporary language with a majority open-source community. Thank you Python.



                  Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this at Does Python have a package/module management system?



                  Alas for everyone using an earlier Python. Manual instructions follow.



                  Python ≤ 2.7.8 and Python ≤ 3.3



                  Follow my detailed instructions at https://stackoverflow.com/a/12476379/284795 . Essentially



                  Official instructions



                  Per https://pip.pypa.io/en/stable/installing.html



                  Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt.



                  python get-pip.py


                  You possibly need an administrator command prompt to do this. Follow http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx



                  For me, this installed Pip at C:Python27Scriptspip.exe. Find pip.exe on your computer, then add its folder (eg. C:Python27Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:



                  pip install httpie


                  There you go (hopefully)!






                  share|improve this answer



















                  • 1




                    +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
                    – wim
                    May 7 '13 at 6:14






                  • 2




                    Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
                    – Matthieu Riegler
                    Feb 24 '14 at 16:24










                  • After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
                    – Pei
                    Jun 26 '14 at 20:07












                  • By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
                    – lfx_cool
                    Aug 2 '14 at 11:25






                  • 1




                    I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
                    – treesAreEverywhere
                    Aug 23 '14 at 12:08















                  up vote
                  80
                  down vote










                  up vote
                  80
                  down vote









                  Python 3.4+ and Python 2.7.9+



                  Good news! Python 3.4 (released March 2014) ships with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Nodejs, Haskell, Perl, Go--almost every other contemporary language with a majority open-source community. Thank you Python.



                  Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this at Does Python have a package/module management system?



                  Alas for everyone using an earlier Python. Manual instructions follow.



                  Python ≤ 2.7.8 and Python ≤ 3.3



                  Follow my detailed instructions at https://stackoverflow.com/a/12476379/284795 . Essentially



                  Official instructions



                  Per https://pip.pypa.io/en/stable/installing.html



                  Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt.



                  python get-pip.py


                  You possibly need an administrator command prompt to do this. Follow http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx



                  For me, this installed Pip at C:Python27Scriptspip.exe. Find pip.exe on your computer, then add its folder (eg. C:Python27Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:



                  pip install httpie


                  There you go (hopefully)!






                  share|improve this answer














                  Python 3.4+ and Python 2.7.9+



                  Good news! Python 3.4 (released March 2014) ships with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Nodejs, Haskell, Perl, Go--almost every other contemporary language with a majority open-source community. Thank you Python.



                  Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this at Does Python have a package/module management system?



                  Alas for everyone using an earlier Python. Manual instructions follow.



                  Python ≤ 2.7.8 and Python ≤ 3.3



                  Follow my detailed instructions at https://stackoverflow.com/a/12476379/284795 . Essentially



                  Official instructions



                  Per https://pip.pypa.io/en/stable/installing.html



                  Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt.



                  python get-pip.py


                  You possibly need an administrator command prompt to do this. Follow http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx



                  For me, this installed Pip at C:Python27Scriptspip.exe. Find pip.exe on your computer, then add its folder (eg. C:Python27Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:



                  pip install httpie


                  There you go (hopefully)!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 23 '17 at 12:26









                  Community

                  11




                  11










                  answered Mar 4 '13 at 21:36









                  Colonel Panic

                  79.5k60295389




                  79.5k60295389








                  • 1




                    +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
                    – wim
                    May 7 '13 at 6:14






                  • 2




                    Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
                    – Matthieu Riegler
                    Feb 24 '14 at 16:24










                  • After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
                    – Pei
                    Jun 26 '14 at 20:07












                  • By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
                    – lfx_cool
                    Aug 2 '14 at 11:25






                  • 1




                    I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
                    – treesAreEverywhere
                    Aug 23 '14 at 12:08
















                  • 1




                    +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
                    – wim
                    May 7 '13 at 6:14






                  • 2




                    Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
                    – Matthieu Riegler
                    Feb 24 '14 at 16:24










                  • After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
                    – Pei
                    Jun 26 '14 at 20:07












                  • By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
                    – lfx_cool
                    Aug 2 '14 at 11:25






                  • 1




                    I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
                    – treesAreEverywhere
                    Aug 23 '14 at 12:08










                  1




                  1




                  +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
                  – wim
                  May 7 '13 at 6:14




                  +1 great answer. what is a piece of cake on ubuntu was a world of pain on windows, the .exe installers made it all better.
                  – wim
                  May 7 '13 at 6:14




                  2




                  2




                  Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
                  – Matthieu Riegler
                  Feb 24 '14 at 16:24




                  Pip will be shipped with Python 3.4 legacy.python.org/dev/peps/pep-0453
                  – Matthieu Riegler
                  Feb 24 '14 at 16:24












                  After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
                  – Pei
                  Jun 26 '14 at 20:07






                  After python get-pip.py, I also make a symlink from pip3 in /Library/Frameworks/Python.framework/Versions/3.3/bin (for example) to my system PATH, to make pip3 available on command line.
                  – Pei
                  Jun 26 '14 at 20:07














                  By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
                  – lfx_cool
                  Aug 2 '14 at 11:25




                  By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.
                  – lfx_cool
                  Aug 2 '14 at 11:25




                  1




                  1




                  I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
                  – treesAreEverywhere
                  Aug 23 '14 at 12:08






                  I just installed python 3.4.1 from scratch on windows 8. Where is pip? How can i start it?
                  – treesAreEverywhere
                  Aug 23 '14 at 12:08












                  up vote
                  46
                  down vote













                  For Ubuntu 12.04 or older,



                  sudo apt-get install python3-pip


                  won't work. Instead, use:



                  sudo apt-get install python3-setuptools ca-certificates
                  sudo easy_install3 pip





                  share|improve this answer























                  • worked on Debian (Jessie)
                    – ksaylor11
                    May 4 '15 at 0:43










                  • worked on ubuntu 12.04 .. thnx.. :)
                    – MohK
                    Jul 22 '16 at 11:37










                  • @Duc Pharm Second answer worked on Ubuntu 16.10
                    – vinayakumarnk
                    Mar 22 at 12:16















                  up vote
                  46
                  down vote













                  For Ubuntu 12.04 or older,



                  sudo apt-get install python3-pip


                  won't work. Instead, use:



                  sudo apt-get install python3-setuptools ca-certificates
                  sudo easy_install3 pip





                  share|improve this answer























                  • worked on Debian (Jessie)
                    – ksaylor11
                    May 4 '15 at 0:43










                  • worked on ubuntu 12.04 .. thnx.. :)
                    – MohK
                    Jul 22 '16 at 11:37










                  • @Duc Pharm Second answer worked on Ubuntu 16.10
                    – vinayakumarnk
                    Mar 22 at 12:16













                  up vote
                  46
                  down vote










                  up vote
                  46
                  down vote









                  For Ubuntu 12.04 or older,



                  sudo apt-get install python3-pip


                  won't work. Instead, use:



                  sudo apt-get install python3-setuptools ca-certificates
                  sudo easy_install3 pip





                  share|improve this answer














                  For Ubuntu 12.04 or older,



                  sudo apt-get install python3-pip


                  won't work. Instead, use:



                  sudo apt-get install python3-setuptools ca-certificates
                  sudo easy_install3 pip






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 21 at 15:14









                  Eliezio Oliveira

                  1729




                  1729










                  answered Feb 4 '14 at 9:42









                  Duc Pham

                  55153




                  55153












                  • worked on Debian (Jessie)
                    – ksaylor11
                    May 4 '15 at 0:43










                  • worked on ubuntu 12.04 .. thnx.. :)
                    – MohK
                    Jul 22 '16 at 11:37










                  • @Duc Pharm Second answer worked on Ubuntu 16.10
                    – vinayakumarnk
                    Mar 22 at 12:16


















                  • worked on Debian (Jessie)
                    – ksaylor11
                    May 4 '15 at 0:43










                  • worked on ubuntu 12.04 .. thnx.. :)
                    – MohK
                    Jul 22 '16 at 11:37










                  • @Duc Pharm Second answer worked on Ubuntu 16.10
                    – vinayakumarnk
                    Mar 22 at 12:16
















                  worked on Debian (Jessie)
                  – ksaylor11
                  May 4 '15 at 0:43




                  worked on Debian (Jessie)
                  – ksaylor11
                  May 4 '15 at 0:43












                  worked on ubuntu 12.04 .. thnx.. :)
                  – MohK
                  Jul 22 '16 at 11:37




                  worked on ubuntu 12.04 .. thnx.. :)
                  – MohK
                  Jul 22 '16 at 11:37












                  @Duc Pharm Second answer worked on Ubuntu 16.10
                  – vinayakumarnk
                  Mar 22 at 12:16




                  @Duc Pharm Second answer worked on Ubuntu 16.10
                  – vinayakumarnk
                  Mar 22 at 12:16










                  up vote
                  32
                  down vote













                  Update 2015-01-20:



                  As per https://pip.pypa.io/en/latest/installing.html the current way is:



                  wget https://bootstrap.pypa.io/get-pip.py
                  python get-pip.py


                  I think that should work for any version





                  Original Answer:



                  wget http://python-distribute.org/distribute_setup.py
                  python distribute_setup.py
                  easy_install pip





                  share|improve this answer



















                  • 1




                    I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
                    – MCP
                    Jul 13 '13 at 17:54










                  • Thanks, worked for me on Python 3.3.4
                    – Brian Burns
                    Apr 8 '14 at 18:33






                  • 2




                    wget: unable to resolve host address ‘python-distribute.org’
                    – newguy
                    Dec 8 '14 at 5:47










                  • wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
                    – j3ffyang
                    Jul 20 at 9:45

















                  up vote
                  32
                  down vote













                  Update 2015-01-20:



                  As per https://pip.pypa.io/en/latest/installing.html the current way is:



                  wget https://bootstrap.pypa.io/get-pip.py
                  python get-pip.py


                  I think that should work for any version





                  Original Answer:



                  wget http://python-distribute.org/distribute_setup.py
                  python distribute_setup.py
                  easy_install pip





                  share|improve this answer



















                  • 1




                    I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
                    – MCP
                    Jul 13 '13 at 17:54










                  • Thanks, worked for me on Python 3.3.4
                    – Brian Burns
                    Apr 8 '14 at 18:33






                  • 2




                    wget: unable to resolve host address ‘python-distribute.org’
                    – newguy
                    Dec 8 '14 at 5:47










                  • wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
                    – j3ffyang
                    Jul 20 at 9:45















                  up vote
                  32
                  down vote










                  up vote
                  32
                  down vote









                  Update 2015-01-20:



                  As per https://pip.pypa.io/en/latest/installing.html the current way is:



                  wget https://bootstrap.pypa.io/get-pip.py
                  python get-pip.py


                  I think that should work for any version





                  Original Answer:



                  wget http://python-distribute.org/distribute_setup.py
                  python distribute_setup.py
                  easy_install pip





                  share|improve this answer














                  Update 2015-01-20:



                  As per https://pip.pypa.io/en/latest/installing.html the current way is:



                  wget https://bootstrap.pypa.io/get-pip.py
                  python get-pip.py


                  I think that should work for any version





                  Original Answer:



                  wget http://python-distribute.org/distribute_setup.py
                  python distribute_setup.py
                  easy_install pip






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 13 '15 at 16:26









                  Sandeep Raju Prabhakar

                  4,74342738




                  4,74342738










                  answered Jul 8 '13 at 0:17









                  Michael Lenzen

                  60476




                  60476








                  • 1




                    I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
                    – MCP
                    Jul 13 '13 at 17:54










                  • Thanks, worked for me on Python 3.3.4
                    – Brian Burns
                    Apr 8 '14 at 18:33






                  • 2




                    wget: unable to resolve host address ‘python-distribute.org’
                    – newguy
                    Dec 8 '14 at 5:47










                  • wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
                    – j3ffyang
                    Jul 20 at 9:45
















                  • 1




                    I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
                    – MCP
                    Jul 13 '13 at 17:54










                  • Thanks, worked for me on Python 3.3.4
                    – Brian Burns
                    Apr 8 '14 at 18:33






                  • 2




                    wget: unable to resolve host address ‘python-distribute.org’
                    – newguy
                    Dec 8 '14 at 5:47










                  • wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
                    – j3ffyang
                    Jul 20 at 9:45










                  1




                  1




                  I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
                  – MCP
                  Jul 13 '13 at 17:54




                  I think I've read about easy_install being depreciated due to insecure connections. I'd read up before using easy_install.
                  – MCP
                  Jul 13 '13 at 17:54












                  Thanks, worked for me on Python 3.3.4
                  – Brian Burns
                  Apr 8 '14 at 18:33




                  Thanks, worked for me on Python 3.3.4
                  – Brian Burns
                  Apr 8 '14 at 18:33




                  2




                  2




                  wget: unable to resolve host address ‘python-distribute.org’
                  – newguy
                  Dec 8 '14 at 5:47




                  wget: unable to resolve host address ‘python-distribute.org’
                  – newguy
                  Dec 8 '14 at 5:47












                  wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
                  – j3ffyang
                  Jul 20 at 9:45






                  wget bootstrap.pypa.io/get-pip.py && python get-pip.py This works for me and upgrades pip3
                  – j3ffyang
                  Jul 20 at 9:45












                  up vote
                  17
                  down vote













                  python3 -m ensurepip


                  I'm not sure when exactly this was introduced, but it's installed pip3 for me when it didn't already exist.






                  share|improve this answer

















                  • 1




                    Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
                    – Antwane
                    May 3 '16 at 8:31










                  • This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
                    – not2qubit
                    Mar 24 '17 at 23:10










                  • This worked fantastically!
                    – turiyag
                    Mar 21 at 2:59















                  up vote
                  17
                  down vote













                  python3 -m ensurepip


                  I'm not sure when exactly this was introduced, but it's installed pip3 for me when it didn't already exist.






                  share|improve this answer

















                  • 1




                    Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
                    – Antwane
                    May 3 '16 at 8:31










                  • This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
                    – not2qubit
                    Mar 24 '17 at 23:10










                  • This worked fantastically!
                    – turiyag
                    Mar 21 at 2:59













                  up vote
                  17
                  down vote










                  up vote
                  17
                  down vote









                  python3 -m ensurepip


                  I'm not sure when exactly this was introduced, but it's installed pip3 for me when it didn't already exist.






                  share|improve this answer












                  python3 -m ensurepip


                  I'm not sure when exactly this was introduced, but it's installed pip3 for me when it didn't already exist.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 23 '16 at 18:15









                  Dave Hylands

                  43336




                  43336








                  • 1




                    Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
                    – Antwane
                    May 3 '16 at 8:31










                  • This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
                    – not2qubit
                    Mar 24 '17 at 23:10










                  • This worked fantastically!
                    – turiyag
                    Mar 21 at 2:59














                  • 1




                    Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
                    – Antwane
                    May 3 '16 at 8:31










                  • This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
                    – not2qubit
                    Mar 24 '17 at 23:10










                  • This worked fantastically!
                    – turiyag
                    Mar 21 at 2:59








                  1




                  1




                  Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
                  – Antwane
                  May 3 '16 at 8:31




                  Thank you, this command pointed my mistake: I built python 3.5 without libssl-dev package, so PIP was not built
                  – Antwane
                  May 3 '16 at 8:31












                  This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
                  – not2qubit
                  Mar 24 '17 at 23:10




                  This also worked on cygwin! First update: pip2 install --upgrade pip and apt-cyg install python3. Then what you wrote and you've got pip3.
                  – not2qubit
                  Mar 24 '17 at 23:10












                  This worked fantastically!
                  – turiyag
                  Mar 21 at 2:59




                  This worked fantastically!
                  – turiyag
                  Mar 21 at 2:59










                  up vote
                  17
                  down vote













                  if you're using python 3.4+



                  just type:



                  python3 -m pip





                  share|improve this answer





















                  • Works for me thanks
                    – Antoine
                    Dec 13 '16 at 0:32










                  • On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
                    – turiyag
                    Mar 21 at 2:58

















                  up vote
                  17
                  down vote













                  if you're using python 3.4+



                  just type:



                  python3 -m pip





                  share|improve this answer





















                  • Works for me thanks
                    – Antoine
                    Dec 13 '16 at 0:32










                  • On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
                    – turiyag
                    Mar 21 at 2:58















                  up vote
                  17
                  down vote










                  up vote
                  17
                  down vote









                  if you're using python 3.4+



                  just type:



                  python3 -m pip





                  share|improve this answer












                  if you're using python 3.4+



                  just type:



                  python3 -m pip






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 3 '16 at 10:51









                  Ari Pratomo

                  43965




                  43965












                  • Works for me thanks
                    – Antoine
                    Dec 13 '16 at 0:32










                  • On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
                    – turiyag
                    Mar 21 at 2:58




















                  • Works for me thanks
                    – Antoine
                    Dec 13 '16 at 0:32










                  • On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
                    – turiyag
                    Mar 21 at 2:58


















                  Works for me thanks
                  – Antoine
                  Dec 13 '16 at 0:32




                  Works for me thanks
                  – Antoine
                  Dec 13 '16 at 0:32












                  On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
                  – turiyag
                  Mar 21 at 2:58






                  On CentOS:6 docker image: python3 -m pip /usr/bin/python3: No module named pip
                  – turiyag
                  Mar 21 at 2:58












                  up vote
                  12
                  down vote













                  Single Python in system



                  To install packages in Python always follow these steps:




                  1. If the package is for python 2.x: sudo python -m pip install [package]

                  2. If the package is for python 3.x: sudo python3 -m pip install [package]


                  Note: This is assuming no alias is set for python



                  Through this method, there will be no confusion regarding which python version is receiving the package.



                  Multiple Pythons



                  Say you have python3 ↔ python3.6 and python3.7 ↔ python3.7




                  1. To install for python3.6: sudo python3 -m pip install [package]

                  2. To instal for python3.7: sudo python3.7 -m pip install [package]


                  This is essentially the same method as shown previously.



                  Note 1



                  How to find which python, your python3 command spawns:



                  ganesh@Ganesh:~$ python3 # Type in terminal
                  Python 3.6.6 (default, Sep 12 2018, 18:26:19) # Your python3 version
                  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
                  Type "help", "copyright", "credits" or "license" for more information.
                  >>>


                  Notice python 3.6.6 in the second line.



                  Note 2



                  Change what python3 or python points to: https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3






                  share|improve this answer























                  • Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
                    – Christopher Hunter
                    Oct 16 at 21:41















                  up vote
                  12
                  down vote













                  Single Python in system



                  To install packages in Python always follow these steps:




                  1. If the package is for python 2.x: sudo python -m pip install [package]

                  2. If the package is for python 3.x: sudo python3 -m pip install [package]


                  Note: This is assuming no alias is set for python



                  Through this method, there will be no confusion regarding which python version is receiving the package.



                  Multiple Pythons



                  Say you have python3 ↔ python3.6 and python3.7 ↔ python3.7




                  1. To install for python3.6: sudo python3 -m pip install [package]

                  2. To instal for python3.7: sudo python3.7 -m pip install [package]


                  This is essentially the same method as shown previously.



                  Note 1



                  How to find which python, your python3 command spawns:



                  ganesh@Ganesh:~$ python3 # Type in terminal
                  Python 3.6.6 (default, Sep 12 2018, 18:26:19) # Your python3 version
                  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
                  Type "help", "copyright", "credits" or "license" for more information.
                  >>>


                  Notice python 3.6.6 in the second line.



                  Note 2



                  Change what python3 or python points to: https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3






                  share|improve this answer























                  • Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
                    – Christopher Hunter
                    Oct 16 at 21:41













                  up vote
                  12
                  down vote










                  up vote
                  12
                  down vote









                  Single Python in system



                  To install packages in Python always follow these steps:




                  1. If the package is for python 2.x: sudo python -m pip install [package]

                  2. If the package is for python 3.x: sudo python3 -m pip install [package]


                  Note: This is assuming no alias is set for python



                  Through this method, there will be no confusion regarding which python version is receiving the package.



                  Multiple Pythons



                  Say you have python3 ↔ python3.6 and python3.7 ↔ python3.7




                  1. To install for python3.6: sudo python3 -m pip install [package]

                  2. To instal for python3.7: sudo python3.7 -m pip install [package]


                  This is essentially the same method as shown previously.



                  Note 1



                  How to find which python, your python3 command spawns:



                  ganesh@Ganesh:~$ python3 # Type in terminal
                  Python 3.6.6 (default, Sep 12 2018, 18:26:19) # Your python3 version
                  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
                  Type "help", "copyright", "credits" or "license" for more information.
                  >>>


                  Notice python 3.6.6 in the second line.



                  Note 2



                  Change what python3 or python points to: https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3






                  share|improve this answer














                  Single Python in system



                  To install packages in Python always follow these steps:




                  1. If the package is for python 2.x: sudo python -m pip install [package]

                  2. If the package is for python 3.x: sudo python3 -m pip install [package]


                  Note: This is assuming no alias is set for python



                  Through this method, there will be no confusion regarding which python version is receiving the package.



                  Multiple Pythons



                  Say you have python3 ↔ python3.6 and python3.7 ↔ python3.7




                  1. To install for python3.6: sudo python3 -m pip install [package]

                  2. To instal for python3.7: sudo python3.7 -m pip install [package]


                  This is essentially the same method as shown previously.



                  Note 1



                  How to find which python, your python3 command spawns:



                  ganesh@Ganesh:~$ python3 # Type in terminal
                  Python 3.6.6 (default, Sep 12 2018, 18:26:19) # Your python3 version
                  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
                  Type "help", "copyright", "credits" or "license" for more information.
                  >>>


                  Notice python 3.6.6 in the second line.



                  Note 2



                  Change what python3 or python points to: https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 24 at 6:07

























                  answered Nov 7 '16 at 13:09









                  Ganesh K

                  1,23211023




                  1,23211023












                  • Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
                    – Christopher Hunter
                    Oct 16 at 21:41


















                  • Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
                    – Christopher Hunter
                    Oct 16 at 21:41
















                  Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
                  – Christopher Hunter
                  Oct 16 at 21:41




                  Of all these methods, this is the only way I managed to get pip to install for python3.5 when I have both 3.4 and 3.5 on the system.
                  – Christopher Hunter
                  Oct 16 at 21:41










                  up vote
                  10
                  down vote













                  Older version of Homebrew



                  If you are on macOS, use homebrew.



                  brew install python3 # this installs python only
                  brew postinstall python3 # this command installs pip


                  Also note that you should check the console if the install finished successfully. Sometimes it doesn't (e.g. an error due to ownership), but people simply overlook the log.





                  UPDATED - Homebrew version after 1.5



                  According to the official Homebrew page:




                  On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.




                  So to install Python 3, run the following command:



                  brew install python3


                  Then, the pip is installed automatically, and you can install any package by pip install <package>.






                  share|improve this answer



























                    up vote
                    10
                    down vote













                    Older version of Homebrew



                    If you are on macOS, use homebrew.



                    brew install python3 # this installs python only
                    brew postinstall python3 # this command installs pip


                    Also note that you should check the console if the install finished successfully. Sometimes it doesn't (e.g. an error due to ownership), but people simply overlook the log.





                    UPDATED - Homebrew version after 1.5



                    According to the official Homebrew page:




                    On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.




                    So to install Python 3, run the following command:



                    brew install python3


                    Then, the pip is installed automatically, and you can install any package by pip install <package>.






                    share|improve this answer

























                      up vote
                      10
                      down vote










                      up vote
                      10
                      down vote









                      Older version of Homebrew



                      If you are on macOS, use homebrew.



                      brew install python3 # this installs python only
                      brew postinstall python3 # this command installs pip


                      Also note that you should check the console if the install finished successfully. Sometimes it doesn't (e.g. an error due to ownership), but people simply overlook the log.





                      UPDATED - Homebrew version after 1.5



                      According to the official Homebrew page:




                      On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.




                      So to install Python 3, run the following command:



                      brew install python3


                      Then, the pip is installed automatically, and you can install any package by pip install <package>.






                      share|improve this answer














                      Older version of Homebrew



                      If you are on macOS, use homebrew.



                      brew install python3 # this installs python only
                      brew postinstall python3 # this command installs pip


                      Also note that you should check the console if the install finished successfully. Sometimes it doesn't (e.g. an error due to ownership), but people simply overlook the log.





                      UPDATED - Homebrew version after 1.5



                      According to the official Homebrew page:




                      On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.




                      So to install Python 3, run the following command:



                      brew install python3


                      Then, the pip is installed automatically, and you can install any package by pip install <package>.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Mar 10 at 5:44

























                      answered Nov 27 '17 at 21:17









                      Blaszard

                      11.7k32106176




                      11.7k32106176






















                          up vote
                          4
                          down vote













                          If you use several different versions of python try using virtualenv http://www.virtualenv.org/en/latest/virtualenv.html#installation



                          With the advantage of pip for each local environment.



                          Then install a local environment in the current directory by:



                          virtualenv -p /usr/local/bin/python3.3 ENV --verbose


                          Note that you specify the path to a python binary you have installed on your system.



                          Then there are now an local pythonenvironment in that folder. ./ENV



                          Now there should be ./ENV/pip-3.3



                          use
                          ./ENV/pip-3.3 freeze to list the local installed libraries.



                          use ./ENV/pip-3.3 install packagename to install at the local environment.



                          use ./ENV/python3.3 pythonfile.py to run your python script.






                          share|improve this answer

























                            up vote
                            4
                            down vote













                            If you use several different versions of python try using virtualenv http://www.virtualenv.org/en/latest/virtualenv.html#installation



                            With the advantage of pip for each local environment.



                            Then install a local environment in the current directory by:



                            virtualenv -p /usr/local/bin/python3.3 ENV --verbose


                            Note that you specify the path to a python binary you have installed on your system.



                            Then there are now an local pythonenvironment in that folder. ./ENV



                            Now there should be ./ENV/pip-3.3



                            use
                            ./ENV/pip-3.3 freeze to list the local installed libraries.



                            use ./ENV/pip-3.3 install packagename to install at the local environment.



                            use ./ENV/python3.3 pythonfile.py to run your python script.






                            share|improve this answer























                              up vote
                              4
                              down vote










                              up vote
                              4
                              down vote









                              If you use several different versions of python try using virtualenv http://www.virtualenv.org/en/latest/virtualenv.html#installation



                              With the advantage of pip for each local environment.



                              Then install a local environment in the current directory by:



                              virtualenv -p /usr/local/bin/python3.3 ENV --verbose


                              Note that you specify the path to a python binary you have installed on your system.



                              Then there are now an local pythonenvironment in that folder. ./ENV



                              Now there should be ./ENV/pip-3.3



                              use
                              ./ENV/pip-3.3 freeze to list the local installed libraries.



                              use ./ENV/pip-3.3 install packagename to install at the local environment.



                              use ./ENV/python3.3 pythonfile.py to run your python script.






                              share|improve this answer












                              If you use several different versions of python try using virtualenv http://www.virtualenv.org/en/latest/virtualenv.html#installation



                              With the advantage of pip for each local environment.



                              Then install a local environment in the current directory by:



                              virtualenv -p /usr/local/bin/python3.3 ENV --verbose


                              Note that you specify the path to a python binary you have installed on your system.



                              Then there are now an local pythonenvironment in that folder. ./ENV



                              Now there should be ./ENV/pip-3.3



                              use
                              ./ENV/pip-3.3 freeze to list the local installed libraries.



                              use ./ENV/pip-3.3 install packagename to install at the local environment.



                              use ./ENV/python3.3 pythonfile.py to run your python script.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Dec 2 '13 at 10:40









                              The Demz

                              4,53032839




                              4,53032839






















                                  up vote
                                  4
                                  down vote













                                  Here is my way to solve this problem at ubuntu 12.04:



                                  sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev


                                  Then install the python3 from source code:



                                  wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
                                  tar xvf Python-3.4.0.tar.xz
                                  cd Python-3.4.0
                                  ./configure
                                  make
                                  make test
                                  sudo make install


                                  When you finished installing all of them, pip3 will get installed automatically.






                                  share|improve this answer





















                                  • ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
                                    – Mona Jalal
                                    Aug 4 '16 at 22:04















                                  up vote
                                  4
                                  down vote













                                  Here is my way to solve this problem at ubuntu 12.04:



                                  sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev


                                  Then install the python3 from source code:



                                  wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
                                  tar xvf Python-3.4.0.tar.xz
                                  cd Python-3.4.0
                                  ./configure
                                  make
                                  make test
                                  sudo make install


                                  When you finished installing all of them, pip3 will get installed automatically.






                                  share|improve this answer





















                                  • ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
                                    – Mona Jalal
                                    Aug 4 '16 at 22:04













                                  up vote
                                  4
                                  down vote










                                  up vote
                                  4
                                  down vote









                                  Here is my way to solve this problem at ubuntu 12.04:



                                  sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev


                                  Then install the python3 from source code:



                                  wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
                                  tar xvf Python-3.4.0.tar.xz
                                  cd Python-3.4.0
                                  ./configure
                                  make
                                  make test
                                  sudo make install


                                  When you finished installing all of them, pip3 will get installed automatically.






                                  share|improve this answer












                                  Here is my way to solve this problem at ubuntu 12.04:



                                  sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev


                                  Then install the python3 from source code:



                                  wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
                                  tar xvf Python-3.4.0.tar.xz
                                  cd Python-3.4.0
                                  ./configure
                                  make
                                  make test
                                  sudo make install


                                  When you finished installing all of them, pip3 will get installed automatically.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Apr 12 '14 at 3:49









                                  frank.liu

                                  1391110




                                  1391110












                                  • ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
                                    – Mona Jalal
                                    Aug 4 '16 at 22:04


















                                  • ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
                                    – Mona Jalal
                                    Aug 4 '16 at 22:04
















                                  ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
                                  – Mona Jalal
                                  Aug 4 '16 at 22:04




                                  ImportError: No module named 'pip' after I did all these for python3.4.1 from source off the original python website! Python 3.4.1 (default, Aug 4 2016, 16:56:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
                                  – Mona Jalal
                                  Aug 4 '16 at 22:04










                                  up vote
                                  3
                                  down vote













                                  This is what I did on OS X Mavericks to get this to work.



                                  Firstly, have brew installed



                                  Install python 3.4



                                  brew install python3


                                  Then I get the latest version of distribute:



                                  wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a

                                  unzip distribute-0.7.3.zip
                                  cd distribute-0.7.3
                                  sudo setup.py install
                                  sudo easy_install-3.4 pip
                                  sudo pip3.4 install virtualenv
                                  sudo pip3.4 install virtualenvwrapper

                                  mkvirtualenv py3

                                  python --version
                                  Python 3.4.1


                                  I hope this helps.






                                  share|improve this answer





















                                  • This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
                                    – hamx0r
                                    Oct 21 '15 at 1:15










                                  • @hamx0r you would run python3 or you could symlink it:
                                    – silverdagger
                                    Oct 22 '15 at 4:55















                                  up vote
                                  3
                                  down vote













                                  This is what I did on OS X Mavericks to get this to work.



                                  Firstly, have brew installed



                                  Install python 3.4



                                  brew install python3


                                  Then I get the latest version of distribute:



                                  wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a

                                  unzip distribute-0.7.3.zip
                                  cd distribute-0.7.3
                                  sudo setup.py install
                                  sudo easy_install-3.4 pip
                                  sudo pip3.4 install virtualenv
                                  sudo pip3.4 install virtualenvwrapper

                                  mkvirtualenv py3

                                  python --version
                                  Python 3.4.1


                                  I hope this helps.






                                  share|improve this answer





















                                  • This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
                                    – hamx0r
                                    Oct 21 '15 at 1:15










                                  • @hamx0r you would run python3 or you could symlink it:
                                    – silverdagger
                                    Oct 22 '15 at 4:55













                                  up vote
                                  3
                                  down vote










                                  up vote
                                  3
                                  down vote









                                  This is what I did on OS X Mavericks to get this to work.



                                  Firstly, have brew installed



                                  Install python 3.4



                                  brew install python3


                                  Then I get the latest version of distribute:



                                  wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a

                                  unzip distribute-0.7.3.zip
                                  cd distribute-0.7.3
                                  sudo setup.py install
                                  sudo easy_install-3.4 pip
                                  sudo pip3.4 install virtualenv
                                  sudo pip3.4 install virtualenvwrapper

                                  mkvirtualenv py3

                                  python --version
                                  Python 3.4.1


                                  I hope this helps.






                                  share|improve this answer












                                  This is what I did on OS X Mavericks to get this to work.



                                  Firstly, have brew installed



                                  Install python 3.4



                                  brew install python3


                                  Then I get the latest version of distribute:



                                  wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a

                                  unzip distribute-0.7.3.zip
                                  cd distribute-0.7.3
                                  sudo setup.py install
                                  sudo easy_install-3.4 pip
                                  sudo pip3.4 install virtualenv
                                  sudo pip3.4 install virtualenvwrapper

                                  mkvirtualenv py3

                                  python --version
                                  Python 3.4.1


                                  I hope this helps.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Aug 7 '14 at 23:09









                                  silverdagger

                                  516517




                                  516517












                                  • This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
                                    – hamx0r
                                    Oct 21 '15 at 1:15










                                  • @hamx0r you would run python3 or you could symlink it:
                                    – silverdagger
                                    Oct 22 '15 at 4:55


















                                  • This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
                                    – hamx0r
                                    Oct 21 '15 at 1:15










                                  • @hamx0r you would run python3 or you could symlink it:
                                    – silverdagger
                                    Oct 22 '15 at 4:55
















                                  This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
                                  – hamx0r
                                  Oct 21 '15 at 1:15




                                  This helped until the mkvirtualenv py3 line - on OS X El Capitan, i get a command not found error. Also, to actually use python 3 after using brew to install it, i have to run python3 rather than just python which still maps to python 2.7. are there different steps for El Capitan?
                                  – hamx0r
                                  Oct 21 '15 at 1:15












                                  @hamx0r you would run python3 or you could symlink it:
                                  – silverdagger
                                  Oct 22 '15 at 4:55




                                  @hamx0r you would run python3 or you could symlink it:
                                  – silverdagger
                                  Oct 22 '15 at 4:55










                                  up vote
                                  2
                                  down vote













                                  For python3 try this:



                                  wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python


                                  The good thing is that It will also detect what version of python you have (even if it's an environment of python in your custom location).
                                  After this you can proceed normally with (for example)



                                  pip install numpy


                                  source:
                                  https://pypi.python.org/pypi/setuptools/1.1.6#upgrading-from-setuptools-0-6






                                  share|improve this answer

























                                    up vote
                                    2
                                    down vote













                                    For python3 try this:



                                    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python


                                    The good thing is that It will also detect what version of python you have (even if it's an environment of python in your custom location).
                                    After this you can proceed normally with (for example)



                                    pip install numpy


                                    source:
                                    https://pypi.python.org/pypi/setuptools/1.1.6#upgrading-from-setuptools-0-6






                                    share|improve this answer























                                      up vote
                                      2
                                      down vote










                                      up vote
                                      2
                                      down vote









                                      For python3 try this:



                                      wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python


                                      The good thing is that It will also detect what version of python you have (even if it's an environment of python in your custom location).
                                      After this you can proceed normally with (for example)



                                      pip install numpy


                                      source:
                                      https://pypi.python.org/pypi/setuptools/1.1.6#upgrading-from-setuptools-0-6






                                      share|improve this answer












                                      For python3 try this:



                                      wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python


                                      The good thing is that It will also detect what version of python you have (even if it's an environment of python in your custom location).
                                      After this you can proceed normally with (for example)



                                      pip install numpy


                                      source:
                                      https://pypi.python.org/pypi/setuptools/1.1.6#upgrading-from-setuptools-0-6







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Sep 27 '13 at 21:35









                                      moldovean

                                      1,8532224




                                      1,8532224






















                                          up vote
                                          2
                                          down vote













                                          Assuming you are in a highly restricted computer env (such as myself) without root access or ability to install packages...



                                          I had never setup a fresh/standalone/raw/non-root instance of Python+virtualenv before this post. I had do quite a bit of Googling to make this work.




                                          1. Decide if you are using python (python2) or python3 and set your PATH correctly. (I am strictly a python3 user.) All commands below can substitute python3 for python if you are python2 user.

                                          2. wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-x.y.z.tar.gz

                                          3. tar -xzvf virtualenv-x.y.z.tar.gz

                                          4. python3 virtualenv-x.y.z/virtualenv.py --python $(which python3) /path/to/new/virtualenv


                                          5. source /path/to/new/virtualenv/bin/activate

                                            • Assumes you are using a Bourne-compatible shell, e.g., bash

                                            • Brilliantly, this virtualenv package includes a standalone version of pip and setuptools that are auto-magically installed into each new virtualenv. This solves the chicken and egg problem.

                                            • You may want to create an alias (or update your ~/.bashrc, etc.) for this final command to activate the python virtualenv during each login. It can be a pain to remember all these paths and commands.



                                          6. Check your version of python now: which python3 should give: /path/to/new/virtualenv/bin/python3

                                          7. Check pip is also available in the virtualenv via which pip... should give: /path/to/new/virtualenv/bin/pip


                                          Then... pip, pip, pip!



                                          Final tip to newbie Pythoneers: You don't think you need virtualenv when you start, but you will be happy to have it later. Helps with "what if" installation / upgrade scenarios for open source / shared packages.



                                          Ref: https://virtualenv.pypa.io/en/latest/installation.html






                                          share|improve this answer



























                                            up vote
                                            2
                                            down vote













                                            Assuming you are in a highly restricted computer env (such as myself) without root access or ability to install packages...



                                            I had never setup a fresh/standalone/raw/non-root instance of Python+virtualenv before this post. I had do quite a bit of Googling to make this work.




                                            1. Decide if you are using python (python2) or python3 and set your PATH correctly. (I am strictly a python3 user.) All commands below can substitute python3 for python if you are python2 user.

                                            2. wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-x.y.z.tar.gz

                                            3. tar -xzvf virtualenv-x.y.z.tar.gz

                                            4. python3 virtualenv-x.y.z/virtualenv.py --python $(which python3) /path/to/new/virtualenv


                                            5. source /path/to/new/virtualenv/bin/activate

                                              • Assumes you are using a Bourne-compatible shell, e.g., bash

                                              • Brilliantly, this virtualenv package includes a standalone version of pip and setuptools that are auto-magically installed into each new virtualenv. This solves the chicken and egg problem.

                                              • You may want to create an alias (or update your ~/.bashrc, etc.) for this final command to activate the python virtualenv during each login. It can be a pain to remember all these paths and commands.



                                            6. Check your version of python now: which python3 should give: /path/to/new/virtualenv/bin/python3

                                            7. Check pip is also available in the virtualenv via which pip... should give: /path/to/new/virtualenv/bin/pip


                                            Then... pip, pip, pip!



                                            Final tip to newbie Pythoneers: You don't think you need virtualenv when you start, but you will be happy to have it later. Helps with "what if" installation / upgrade scenarios for open source / shared packages.



                                            Ref: https://virtualenv.pypa.io/en/latest/installation.html






                                            share|improve this answer

























                                              up vote
                                              2
                                              down vote










                                              up vote
                                              2
                                              down vote









                                              Assuming you are in a highly restricted computer env (such as myself) without root access or ability to install packages...



                                              I had never setup a fresh/standalone/raw/non-root instance of Python+virtualenv before this post. I had do quite a bit of Googling to make this work.




                                              1. Decide if you are using python (python2) or python3 and set your PATH correctly. (I am strictly a python3 user.) All commands below can substitute python3 for python if you are python2 user.

                                              2. wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-x.y.z.tar.gz

                                              3. tar -xzvf virtualenv-x.y.z.tar.gz

                                              4. python3 virtualenv-x.y.z/virtualenv.py --python $(which python3) /path/to/new/virtualenv


                                              5. source /path/to/new/virtualenv/bin/activate

                                                • Assumes you are using a Bourne-compatible shell, e.g., bash

                                                • Brilliantly, this virtualenv package includes a standalone version of pip and setuptools that are auto-magically installed into each new virtualenv. This solves the chicken and egg problem.

                                                • You may want to create an alias (or update your ~/.bashrc, etc.) for this final command to activate the python virtualenv during each login. It can be a pain to remember all these paths and commands.



                                              6. Check your version of python now: which python3 should give: /path/to/new/virtualenv/bin/python3

                                              7. Check pip is also available in the virtualenv via which pip... should give: /path/to/new/virtualenv/bin/pip


                                              Then... pip, pip, pip!



                                              Final tip to newbie Pythoneers: You don't think you need virtualenv when you start, but you will be happy to have it later. Helps with "what if" installation / upgrade scenarios for open source / shared packages.



                                              Ref: https://virtualenv.pypa.io/en/latest/installation.html






                                              share|improve this answer














                                              Assuming you are in a highly restricted computer env (such as myself) without root access or ability to install packages...



                                              I had never setup a fresh/standalone/raw/non-root instance of Python+virtualenv before this post. I had do quite a bit of Googling to make this work.




                                              1. Decide if you are using python (python2) or python3 and set your PATH correctly. (I am strictly a python3 user.) All commands below can substitute python3 for python if you are python2 user.

                                              2. wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-x.y.z.tar.gz

                                              3. tar -xzvf virtualenv-x.y.z.tar.gz

                                              4. python3 virtualenv-x.y.z/virtualenv.py --python $(which python3) /path/to/new/virtualenv


                                              5. source /path/to/new/virtualenv/bin/activate

                                                • Assumes you are using a Bourne-compatible shell, e.g., bash

                                                • Brilliantly, this virtualenv package includes a standalone version of pip and setuptools that are auto-magically installed into each new virtualenv. This solves the chicken and egg problem.

                                                • You may want to create an alias (or update your ~/.bashrc, etc.) for this final command to activate the python virtualenv during each login. It can be a pain to remember all these paths and commands.



                                              6. Check your version of python now: which python3 should give: /path/to/new/virtualenv/bin/python3

                                              7. Check pip is also available in the virtualenv via which pip... should give: /path/to/new/virtualenv/bin/pip


                                              Then... pip, pip, pip!



                                              Final tip to newbie Pythoneers: You don't think you need virtualenv when you start, but you will be happy to have it later. Helps with "what if" installation / upgrade scenarios for open source / shared packages.



                                              Ref: https://virtualenv.pypa.io/en/latest/installation.html







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Apr 25 '15 at 14:45

























                                              answered Mar 31 '15 at 12:49









                                              kevinarpe

                                              10k1385108




                                              10k1385108






















                                                  up vote
                                                  1
                                                  down vote













                                                  What’s New In Python 3.4



                                                  pip should always be available



                                                  By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.



                                                  https://docs.python.org/3/whatsnew/3.4.html#whatsnew-pep-453



                                                  so if you have python 3.4 installed, you can just: sudo pip3 install xxx






                                                  share|improve this answer

















                                                  • 1




                                                    pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
                                                    – Water
                                                    Jan 10 '16 at 16:16

















                                                  up vote
                                                  1
                                                  down vote













                                                  What’s New In Python 3.4



                                                  pip should always be available



                                                  By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.



                                                  https://docs.python.org/3/whatsnew/3.4.html#whatsnew-pep-453



                                                  so if you have python 3.4 installed, you can just: sudo pip3 install xxx






                                                  share|improve this answer

















                                                  • 1




                                                    pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
                                                    – Water
                                                    Jan 10 '16 at 16:16















                                                  up vote
                                                  1
                                                  down vote










                                                  up vote
                                                  1
                                                  down vote









                                                  What’s New In Python 3.4



                                                  pip should always be available



                                                  By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.



                                                  https://docs.python.org/3/whatsnew/3.4.html#whatsnew-pep-453



                                                  so if you have python 3.4 installed, you can just: sudo pip3 install xxx






                                                  share|improve this answer












                                                  What’s New In Python 3.4



                                                  pip should always be available



                                                  By default, the commands pipX and pipX.Y will be installed on all platforms (where X.Y stands for the version of the Python installation), along with the pip Python package and its dependencies.



                                                  https://docs.python.org/3/whatsnew/3.4.html#whatsnew-pep-453



                                                  so if you have python 3.4 installed, you can just: sudo pip3 install xxx







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Aug 2 '14 at 11:24









                                                  lfx_cool

                                                  4,36421719




                                                  4,36421719








                                                  • 1




                                                    pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
                                                    – Water
                                                    Jan 10 '16 at 16:16
















                                                  • 1




                                                    pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
                                                    – Water
                                                    Jan 10 '16 at 16:16










                                                  1




                                                  1




                                                  pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
                                                  – Water
                                                  Jan 10 '16 at 16:16






                                                  pip3 was not installed when I installed Python 3.4, I had to follow instructions here to get it.
                                                  – Water
                                                  Jan 10 '16 at 16:16












                                                  up vote
                                                  1
                                                  down vote













                                                  To install pip, securely download get-pip.py.



                                                  Then run the following:



                                                  python get-pip.py



                                                  Be cautious if you're using a Python install that's managed by your
                                                  operating system or another package manager. get-pip.py does not
                                                  coordinate with those tools, and may leave your system in an
                                                  inconsistent state.




                                                  Refer: PIP Installation






                                                  share|improve this answer

























                                                    up vote
                                                    1
                                                    down vote













                                                    To install pip, securely download get-pip.py.



                                                    Then run the following:



                                                    python get-pip.py



                                                    Be cautious if you're using a Python install that's managed by your
                                                    operating system or another package manager. get-pip.py does not
                                                    coordinate with those tools, and may leave your system in an
                                                    inconsistent state.




                                                    Refer: PIP Installation






                                                    share|improve this answer























                                                      up vote
                                                      1
                                                      down vote










                                                      up vote
                                                      1
                                                      down vote









                                                      To install pip, securely download get-pip.py.



                                                      Then run the following:



                                                      python get-pip.py



                                                      Be cautious if you're using a Python install that's managed by your
                                                      operating system or another package manager. get-pip.py does not
                                                      coordinate with those tools, and may leave your system in an
                                                      inconsistent state.




                                                      Refer: PIP Installation






                                                      share|improve this answer












                                                      To install pip, securely download get-pip.py.



                                                      Then run the following:



                                                      python get-pip.py



                                                      Be cautious if you're using a Python install that's managed by your
                                                      operating system or another package manager. get-pip.py does not
                                                      coordinate with those tools, and may leave your system in an
                                                      inconsistent state.




                                                      Refer: PIP Installation







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Nov 27 '16 at 19:03









                                                      Ani Menon

                                                      15.4k65572




                                                      15.4k65572






















                                                          up vote
                                                          1
                                                          down vote













                                                          And for Windows 8.1/10 OS Users just open cmd (command prompt)



                                                          write this : C:Users%USERNAME%AppDataLocalProgramsPythonPython36-32Scripts



                                                          then



                                                          just write this : pip3 install {name of package}



                                                          Hint: the location of folder Python36-32 may get different for new python 3.x versions






                                                          share|improve this answer

























                                                            up vote
                                                            1
                                                            down vote













                                                            And for Windows 8.1/10 OS Users just open cmd (command prompt)



                                                            write this : C:Users%USERNAME%AppDataLocalProgramsPythonPython36-32Scripts



                                                            then



                                                            just write this : pip3 install {name of package}



                                                            Hint: the location of folder Python36-32 may get different for new python 3.x versions






                                                            share|improve this answer























                                                              up vote
                                                              1
                                                              down vote










                                                              up vote
                                                              1
                                                              down vote









                                                              And for Windows 8.1/10 OS Users just open cmd (command prompt)



                                                              write this : C:Users%USERNAME%AppDataLocalProgramsPythonPython36-32Scripts



                                                              then



                                                              just write this : pip3 install {name of package}



                                                              Hint: the location of folder Python36-32 may get different for new python 3.x versions






                                                              share|improve this answer












                                                              And for Windows 8.1/10 OS Users just open cmd (command prompt)



                                                              write this : C:Users%USERNAME%AppDataLocalProgramsPythonPython36-32Scripts



                                                              then



                                                              just write this : pip3 install {name of package}



                                                              Hint: the location of folder Python36-32 may get different for new python 3.x versions







                                                              share|improve this answer












                                                              share|improve this answer



                                                              share|improve this answer










                                                              answered Jul 10 at 9:22









                                                              0x1996

                                                              335




                                                              335






















                                                                  up vote
                                                                  0
                                                                  down vote













                                                                  If your Linux distro came with Python already installed, you should be able to install PIP using your system’s package manager. This is preferable since system-installed versions of Python do not play nicely with the get-pip.py script used on Windows and Mac.



                                                                  Advanced Package Tool (Python 2.x)



                                                                  sudo apt-get install python-pip


                                                                  Advanced Package Tool (Python 3.x)



                                                                  sudo apt-get install python3-pip


                                                                  pacman Package Manager (Python 2.x)



                                                                  sudo pacman -S python2-pip


                                                                  pacman Package Manager (Python 3.x)



                                                                  sudo pacman -S python-pip


                                                                  Yum Package Manager (Python 2.x)



                                                                  sudo yum upgrade python-setuptools
                                                                  sudo yum install python-pip python-wheel


                                                                  Yum Package Manager (Python 3.x)



                                                                  sudo yum install python3 python3-wheel


                                                                  Dandified Yum (Python 2.x)



                                                                  sudo dnf upgrade python-setuptools
                                                                  sudo dnf install python-pip python-wheel


                                                                  Dandified Yum (Python 3.x)



                                                                  sudo dnf install python3 python3-wheel


                                                                  Zypper Package Manager (Python 2.x)



                                                                  sudo zypper install python-pip python-setuptools python-wheel


                                                                  Zypper Package Manager (Python 3.x)



                                                                  sudo zypper install python3-pip python3-setuptools python3-wheel





                                                                  share|improve this answer

























                                                                    up vote
                                                                    0
                                                                    down vote













                                                                    If your Linux distro came with Python already installed, you should be able to install PIP using your system’s package manager. This is preferable since system-installed versions of Python do not play nicely with the get-pip.py script used on Windows and Mac.



                                                                    Advanced Package Tool (Python 2.x)



                                                                    sudo apt-get install python-pip


                                                                    Advanced Package Tool (Python 3.x)



                                                                    sudo apt-get install python3-pip


                                                                    pacman Package Manager (Python 2.x)



                                                                    sudo pacman -S python2-pip


                                                                    pacman Package Manager (Python 3.x)



                                                                    sudo pacman -S python-pip


                                                                    Yum Package Manager (Python 2.x)



                                                                    sudo yum upgrade python-setuptools
                                                                    sudo yum install python-pip python-wheel


                                                                    Yum Package Manager (Python 3.x)



                                                                    sudo yum install python3 python3-wheel


                                                                    Dandified Yum (Python 2.x)



                                                                    sudo dnf upgrade python-setuptools
                                                                    sudo dnf install python-pip python-wheel


                                                                    Dandified Yum (Python 3.x)



                                                                    sudo dnf install python3 python3-wheel


                                                                    Zypper Package Manager (Python 2.x)



                                                                    sudo zypper install python-pip python-setuptools python-wheel


                                                                    Zypper Package Manager (Python 3.x)



                                                                    sudo zypper install python3-pip python3-setuptools python3-wheel





                                                                    share|improve this answer























                                                                      up vote
                                                                      0
                                                                      down vote










                                                                      up vote
                                                                      0
                                                                      down vote









                                                                      If your Linux distro came with Python already installed, you should be able to install PIP using your system’s package manager. This is preferable since system-installed versions of Python do not play nicely with the get-pip.py script used on Windows and Mac.



                                                                      Advanced Package Tool (Python 2.x)



                                                                      sudo apt-get install python-pip


                                                                      Advanced Package Tool (Python 3.x)



                                                                      sudo apt-get install python3-pip


                                                                      pacman Package Manager (Python 2.x)



                                                                      sudo pacman -S python2-pip


                                                                      pacman Package Manager (Python 3.x)



                                                                      sudo pacman -S python-pip


                                                                      Yum Package Manager (Python 2.x)



                                                                      sudo yum upgrade python-setuptools
                                                                      sudo yum install python-pip python-wheel


                                                                      Yum Package Manager (Python 3.x)



                                                                      sudo yum install python3 python3-wheel


                                                                      Dandified Yum (Python 2.x)



                                                                      sudo dnf upgrade python-setuptools
                                                                      sudo dnf install python-pip python-wheel


                                                                      Dandified Yum (Python 3.x)



                                                                      sudo dnf install python3 python3-wheel


                                                                      Zypper Package Manager (Python 2.x)



                                                                      sudo zypper install python-pip python-setuptools python-wheel


                                                                      Zypper Package Manager (Python 3.x)



                                                                      sudo zypper install python3-pip python3-setuptools python3-wheel





                                                                      share|improve this answer












                                                                      If your Linux distro came with Python already installed, you should be able to install PIP using your system’s package manager. This is preferable since system-installed versions of Python do not play nicely with the get-pip.py script used on Windows and Mac.



                                                                      Advanced Package Tool (Python 2.x)



                                                                      sudo apt-get install python-pip


                                                                      Advanced Package Tool (Python 3.x)



                                                                      sudo apt-get install python3-pip


                                                                      pacman Package Manager (Python 2.x)



                                                                      sudo pacman -S python2-pip


                                                                      pacman Package Manager (Python 3.x)



                                                                      sudo pacman -S python-pip


                                                                      Yum Package Manager (Python 2.x)



                                                                      sudo yum upgrade python-setuptools
                                                                      sudo yum install python-pip python-wheel


                                                                      Yum Package Manager (Python 3.x)



                                                                      sudo yum install python3 python3-wheel


                                                                      Dandified Yum (Python 2.x)



                                                                      sudo dnf upgrade python-setuptools
                                                                      sudo dnf install python-pip python-wheel


                                                                      Dandified Yum (Python 3.x)



                                                                      sudo dnf install python3 python3-wheel


                                                                      Zypper Package Manager (Python 2.x)



                                                                      sudo zypper install python-pip python-setuptools python-wheel


                                                                      Zypper Package Manager (Python 3.x)



                                                                      sudo zypper install python3-pip python3-setuptools python3-wheel






                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      answered Aug 11 at 11:31









                                                                      Sonia Rani

                                                                      1603




                                                                      1603






















                                                                          up vote
                                                                          0
                                                                          down vote













                                                                          Below video is how I did in cygwin:



                                                                          https://asciinema.org/a/hSu4kmJ6wb7b2UiuvxiXqtgGK



                                                                          There is weirdness in python's pip, pip2, pip3 craziness. In crazy situations like these, it is imperative that there is less talking or explanations, but instead demonstrate things out.






                                                                          share|improve this answer

























                                                                            up vote
                                                                            0
                                                                            down vote













                                                                            Below video is how I did in cygwin:



                                                                            https://asciinema.org/a/hSu4kmJ6wb7b2UiuvxiXqtgGK



                                                                            There is weirdness in python's pip, pip2, pip3 craziness. In crazy situations like these, it is imperative that there is less talking or explanations, but instead demonstrate things out.






                                                                            share|improve this answer























                                                                              up vote
                                                                              0
                                                                              down vote










                                                                              up vote
                                                                              0
                                                                              down vote









                                                                              Below video is how I did in cygwin:



                                                                              https://asciinema.org/a/hSu4kmJ6wb7b2UiuvxiXqtgGK



                                                                              There is weirdness in python's pip, pip2, pip3 craziness. In crazy situations like these, it is imperative that there is less talking or explanations, but instead demonstrate things out.






                                                                              share|improve this answer












                                                                              Below video is how I did in cygwin:



                                                                              https://asciinema.org/a/hSu4kmJ6wb7b2UiuvxiXqtgGK



                                                                              There is weirdness in python's pip, pip2, pip3 craziness. In crazy situations like these, it is imperative that there is less talking or explanations, but instead demonstrate things out.







                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Oct 11 at 19:34









                                                                              ifelsemonkey

                                                                              539612




                                                                              539612

















                                                                                  protected by Aniket Thakur Jan 7 at 4:38



                                                                                  Thank you for your interest in this question.
                                                                                  Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                  Would you like to answer one of these unanswered questions instead?



                                                                                  Popular posts from this blog

                                                                                  Lallio

                                                                                  Unable to find Lightning Node

                                                                                  Futebolista