econchick / new-coder

New Coder tutorials
zlib License
597 stars 394 forks source link

Getting pip on linux #61

Closed aklapcin closed 9 years ago

aklapcin commented 10 years ago

Hi, I was going through setting up machine on linux, and I have one question. There is python-pip package in both fedora and ubuntu. So to get pip on those systems it is enough to run:

sudo [yum|apt-get] install python-pip

But instruction says to install pip as on mac, where there is no (deb/rpm) packaging system.

treyhunner commented 10 years ago

I prefer to install pip from PyPI because when a new pip release comes out it's easy to upgrade it without waiting for Ubuntu to upgrade it in their package index.

However, I do think the installation guide for Linux should be updated to note package manager usage instead of using curl (which is less safe when over http as the distribute download is).

I like to install pip on Ubuntu this way:

sudo apt-get install python-setuptools
sudo easy_install pip

After this I can easily do a sudo pip install --upgrade pip to upgrade pip.

aklapcin commented 10 years ago

Nice solution with using easy_install to get pip. I think the best way to get pip. But for first python installation the easiest solution is the best.

adrian-em commented 10 years ago

When pip is installed from yum in CentOS (maybe other distros apply too), it is installed as 'python-pip', so I like to set up a link to 'pip':

ln -s /usr/bin/python-pip /usr/bin/pip

It is more comfortable to work with.

merwok commented 10 years ago

This is fixed in recent Red Hat (i.e. it’s now “pip”), but can be worth mentioning for older versions.

adrian-em commented 10 years ago

Nice to know it is fixed. I had to set it up on CentOS 6.4 just for the record. I agree with you that it might be useful for new users.

econchick commented 10 years ago

Thanks gentlemen! @aesptux why aren't you using fedora? ;-)