7

I'm fairly new to python. I'm using Ubuntu 14.04 and have both python 2.7.6 and python 3.4.0 installed. I was trying to install BeautifulSoup but couldn't because I get an error saying

The program 'pip' is currently not installed. 

I found that it comes bundles with python 3.4. I tried to install pip using sudo easy_install pip as mentioned in another question on stackoverflow. But this gives an error sudo: easy_install: command not found.

What is the problem?

mahacoder
  • 895
  • 3
  • 14
  • 29

3 Answers3

8

pip appears to have turned into python -m pip (in your case, python3 -m pip, as Ubuntu's keeping the 2.x line available as python) in Python 3.4.

easy_install for Python 2.7 comes as part of the python-setuptools package. Once installed, running easy_install pip would install pip for your Python 2.7 installation's use.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • Yes. You are correct. When I tried running `python3 -m pip` I'm getting `/usr/local/bin: No module named pip`. So how do I get pip for python 3.4? – mahacoder Feb 01 '15 at 18:11
  • @ak31 http://stackoverflow.com/questions/24137291/ubuntu-pip-not-working-with-python3-4 seems to be the same problem, with solution. – ceejayoz Feb 01 '15 at 18:21
4

How aboutapt-get install python-pip? At least, Debian official repository has python-pip even from wheezy.

soundlake
  • 321
  • 4
  • 10
2

Unfortunately, effective as of April 2018, python-setuptools no longer ships with easy_install, as per Matthias's update:

https://ubuntu.pkgs.org/18.04/ubuntu-main-i386/python-setuptools_39.0.1-2_all.deb.html

However, you can still compile from the source code yourself, and it does work. I just tried it with sudo easy_install shodan, and it ran successfully.

git clone https://github.com/pypa/setuptools.git
cd ./setuptools
python3 bootstrap.py
sudo python3 setup.py install

Hope this helps.