Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install python-devel when using virtualenv

Before asking my question, let me introduce my computing environment first.

  • OS: Red Hat Enterprise Linux Server 6.5.
  • Python: Python 2.6 (by rpm install), Python 2.7 (based on virtualenv)

Question:

I want to install a library that requires python-devel. However, when using

    yum install python-devel

The system installs python-devel-2.6.*, because the installed (yum-packaged) python is version 2.6. My question is , how to install python-devel that matches the version of the python in virtualenv (which is version 2.7 in my case).

Thanks!

like image 887
user1036719 Avatar asked Apr 02 '14 20:04

user1036719


1 Answers

This question has nothing to do with pip or virtualenv. python-dev is a Linux system package, not something you install with pip. You just need to explicitly install python-devel-2.7 - you can search your distribution's package repository for the exact package name.

like image 170
Daniel Roseman Avatar answered Oct 20 '22 20:10

Daniel Roseman