52

Can't install python-dev on centos 6.5. Yum says "No package python-dev available.". No graphical solutions please.

user3616331
  • 531
  • 1
  • 4
  • 3

3 Answers3

118

On CentOS, the python development libraries are under the name python-devel, not python-dev.

So you should use

sudo yum install python-devel

to install them on your CentOS system.

You can search the repositories available to you using the yum search xxxxx command, where xxxxx is the name or part of the name of the package you are looking for.

Further, you may need to specify the architecture (such as python-devel.x86_64), although in my experience yum will automatically install the package that is appropriate for your system. Again, yum search will show you what is available in the repositories you currently have installed/enabled.

Eric
  • 2,636
  • 21
  • 25
Ethan Hohensee
  • 1,557
  • 1
  • 13
  • 20
4

Did you try

yum groupinstall -y 'development tools'

Did you try to download the RPM package and install it?

Did you try to install python-pip then issue pip install python-dev?

Guy Kogus
  • 7,251
  • 1
  • 27
  • 32
Max
  • 1,150
  • 1
  • 10
  • 16
  • Where can i get this rpm package? And yes i ran python-pip and pip install python-dev after that. – user3616331 May 08 '14 at 12:41
  • which library do you use that required python-dev? – Max May 08 '14 at 13:02
  • I just tried to install it on ubuntu and there is no issue – Max May 08 '14 at 13:03
  • apt-get install python-dev Reading package lists... Done Building dependency tree Reading state information... Done """""""omiited"""""""" After this operation, 103 MB of additional disk space will be used. Do you want to continue [Y/n]? n – Max May 08 '14 at 13:04
  • which version of python are you using? 2.6. or 2.7? – Max May 08 '14 at 13:04
1

For anyone looking to install python-devel now, you can use yum install platform-python-devel.x86_64