LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need help installing Python's pip (https://www.linuxquestions.org/questions/linux-software-2/need-help-installing-pythons-pip-4175484548/)

NikosGr 11-14-2013 06:07 AM

Need help installing Python's pip
 
I'm on CentOS 6.3 and i just install latest Python v3.4a

i have also 'yum groupinstall "development tools"'

But i need 'pip priot of installing needed modules for my script like 'pymysql', 'pygeoip'

yum install python-pip
says it cannot find any packagres. any idea why and hot to be able to install pip on my CentOS?

knudfl 11-15-2013 12:13 AM

http://code.activestate.com/lists/python-list/655360/
> "Nick the Gr33k"

→ ""If you want to compile python outside they package manager,
you'll also have to install all the libraries outside of the package manager.""


*** I.e. manual install. If python-pip works with the alpha Python 3.4a !

-

NikosGr 11-15-2013 03:34 AM

Is there any wahy to remove the compilation of 3.4 and try to install it via yum's package manager along with pip?

please provide me with the necessary command i have to issue.

knudfl 11-15-2013 04:10 AM

# 3 .
Quote:

Is there any wahy to remove the compilation of 3.4
How to remove Python : Didn't you ask that question some times before ?
.. As you know : Removing is "Find the Python-3 files, and delete them".


Quote:

3.4 and try to install it via yum's package manager along with pip ?
There is no real "3.4". That's a development version :
http://www.python.org/
Quote : ""Python 3.4.0 alpha 4 has been released""
Current stable is "3.3.2", and there's a release candidate '3.3.3'.

"yum install" : '3.3.2' is in the IUS repo :
(( Ref. the info you got '03 June 3013', post #2, @evo2
http://www.linuxquestions.org/questi...-4175464523/#2 ))

i686 http://dl.iuscommunity.org/pub/ius/s...CentOS/6/i386/
x86_64 http://dl.iuscommunity.org/pub/ius/s...ntOS/6/x86_64/
Code:

[IUS]
name=ius
baseurl=http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/<arch>
enabled=1
gpgcheck=0

-

NikosGr 11-15-2013 04:15 AM

Python 3.4a is installed under '/usr/local/bin/Python'

if i understand you correctly i have to 'rm -rf /usr/local/bin/Python/' ?


becauee

'yum install python3' and 'yum install python-pip'

Why the default repositories does not not include those 2 pavkages?

What will i have to do *exactly* in order to be able to install python and python's pip

You have to be very specific so i cna understand it.

knudfl 11-15-2013 08:16 AM

#
Quote:

'yum install python3' and 'yum install python-pip'

Why the default repositories does not not include those 2 packages ?
CentOS is a server OS. No unnecessary packages by default.
All administrative tools are Python2 based.
CentOS is based on Fedora 12.

If you want bleeding edge applications, use later than "Fedora 12".
→ → Fedora 19 has Python 3 : python3-3.3.2-2.fc19 .
... And 220 (two hundred and twenty) "python3-<app-name>" :
Included is python3-pip-1.3.1-1.fc19 !
* List http://dl.fedoraproject.org/pub/fedo...os/Packages/p/


Quote:

If I understand you correctly I have to 'rm -rf /usr/local/bin/Python/' ?
Better : 1) $ cd /usr/local/bin/
2) # rm -rf Python/

-

NikosGr 11-15-2013 08:21 AM

Only CentOS works with cPanel

Also how's

1) $ cd /usr/local/bin/
2) # rm -rf Python/

any different from 'rm -rf /usr/local/bin/Python/' ?

since i have installed python 34.a from source with configure/make/make install shouldnt i try to 'make uninstall' But i have deleted the /temp/ file which i sues to unzip python.
i also have managed to install EPEL repository.

should i leave it as it it is and:

yum install python3
yum install python-pip

or this will end in a complete mess with havign 3 pythons installed?

knudfl 11-15-2013 08:24 AM

Quote:

What will i have to do *exactly* in order to be able to install python and python's pip

You have to be very specific so I can understand it.
I'll come back to that later.

knudfl 11-15-2013 09:42 AM

# 7 .
Quote:

'make uninstall'
There is no 'uninstall' in any Python2 or 3.

EPEL.repo 'p' http://dl.fedoraproject.org/pub/epel...r_p.group.html
→ → No python3 . All applications "python-** " are "python 2.6".

How to setup the 'ius.repo' : # gedit /etc/yum.repos.d/ius.repo
... And then copy/paste the "code" from post #4. And save the file.
Then you can do # yum install python33-devel


Quote:

and different from 'rm -rf /usr/local/bin/Python/' ?
If you by mistake hit <Enter> ....
when you have typed 'rm -rf /' or 'rm -rf /usr/' : No OS any more !

-

NikosGr 11-15-2013 10:01 AM

I'll write it all and then i will hot enter, or copy paste it like it is now written :)

i have installed EPEL but

i cannot update it and:

'yum install python3' does not return any packages back.

Prior of those of course is it okey to 'rm -rf /usr/local/bin/Python/'? Won't it levae behind any leftovers?

knudfl 11-15-2013 11:27 AM

# 10 .
Quote:

I have installed EPEL but

I cannot update it and:

'yum install python3' does not return any packages back.
What is the purpose of EPEL concerning the current subject : Python3 ?
**** There is no 'python3' in EPEL for CentOS 6.

The file to create is /etc/yum.repos.d/ius.repo

-

NikosGr 11-15-2013 11:30 AM

Just tell em pelase hwo to install latest python and pip through yum.

knudfl 11-15-2013 12:34 PM

# 12 .

A) Python 3 :
1) $ su
2) # gedit /etc/yum.repos.d/ius.repo
... Then enter the repo text for i386, and save the file :
[IUS]
name=ius
baseurl=http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/i386
enabled=1
gpgcheck=0

4) # yum list python3*
... To know the available packages. (In case you didn't visit the link.)
5) # yum install python33-devel
6) $ which python3
... The reply is : /usr/bin/python3

B) 'python3-pip' : No repo with this package.

pip : $ mkdir pypi
$ cd pypi/
$ wget https://bitbucket.org/pypa/setuptool...ap/ez_setup.py
$ su
# python3 ez_setup.py
$ wget https://raw.github.com/pypa/pip/mast...rib/get-pip.py
# python3 get-pip.py
... and you have /usr/bin/pip*

Using pip, example : # pip-3.3 install htmltag

The current list of available Python3 applications is here ..
https://pypi.python.org/pypi?:action...c=533&show=all

-

Habitual 11-15-2013 12:44 PM

Have a gander "Download and install Python 3.3.0" section

NikosGr 11-15-2013 12:45 PM

After step 6 there is no 'pypy' dir just 'pip-1.4.1 dir'

so i cannot cd pypi.

why cant we just install pip via tum like we did with python33-devel and we have to explicitly wget it?


All times are GMT -5. The time now is 01:25 AM.