1

I have read the question :

How can I install python-dev without sudo?

However it does not quite cover the issues I am facing.

I have a Debian 6.0.9 server with system python 2.6.6 installed. We have several applications running with python 2.7.5 or 2.7.3 installed separately in virtualenvs. The applications are installed in /home/user/app/appname/ and the virtualenv python for these would be /home/user/.virtualenvs/appname/bin/python

I cannot simply do an apt install of python2.7 to get 2.7.5 in the system parallel to python 2.6.6, and I cannot do an apt install of python-dev since it wants to install the python-dev for python 2.7.x instead but only sees 2.6.6.

I have found several sites that suggest installing from source, but the only details on installing from source indicate that I should pull the mercurial branch ( https://docs.python.org/devguide/ ), however I cannot figure out how to verify what version of the python-dev I am getting with this method.

Once I find the python-dev for my 2.7.5 and 2.7.3 python installs, then I need to know how to install in my virtualenvs. I cannot find good detailed steps for installing from source and specifying custom or non-standard python binary paths to make the python-dev work once I do find where to get my version of python-dev.

I found this question:

How can I get apt-get to install python packages for a different version of python?

Which indicates to change the /usr/share/python/debian_defaults file for the version of python that I want to install python-dev (or any python package) for, and then use apt-get to install. This however does not work since I cannot use apt-get and I cannot use python2.7 packages through apt anyways since python 2.7 is not installed to the "system".

The specific questions then that this leaves me with are (I believe):

  • Where do I download a source copy of python-dev for my version of python (2.7.5 and 2.7.3)?
  • How do I install this python-dev package to my custom location of python in the virtualenvs?

The non-specific question I still have in the back of my mind that I would give extra points for an answer would be: Why is python administrative information so difficult to find, and where is a good source for documentation on the best practices regarding this type of administrative work with the python libraries and packages?

Thanks everyone for any input! Please let me know if there is a better way to ask this question/set of questions, or if I need to include any additional information, or if I should be asking in a different section of the stackexchange / stackoverflow sites.

PS: I tried to create a python-dev tag, as I have seen many questions involving python-dev, but the tag creation requires 300 reputation points. Someone want to create the tag?

0

You must log in to answer this question.

Browse other questions tagged .