0

I'm using Linux Mint Debian Edition (eq. Debian Testing). There is no python2.6-dev package, which I'd need to install pycrypto for Python 2.6 (since it has a compilation step).

Is there any way to get this package or an equivalent on my system? I already have installed Python 2.6 in my system and I can use it without a hitch.

(The python2.7-dev package is there just fine. But I'm glued to 2.6, so it doesn't suit my needs.)

Braiam
  • 1
  • 11
  • 47
  • 78
Boldewyn
  • 81,211
  • 44
  • 156
  • 212
  • YOu can probably rebuild python2.6 (including the dev packages) from stable on testing. have you tried that? Bear in mind that if you try to make it default python, you'll probably have problems. But I see no reason why you couldn't run it as python2.6 explicitly. – Faheem Mitha Nov 20 '13 at 20:36

2 Answers2

1

No. Debian testing doesn't have python2.6 (and forcing the install can break your installation, since several (in the order of thousands) packages depends of a specific version of python). It was dropped. If you want you can use stable instead (if Mint has a stable equivalent) otherwise you are stuck with python2.7.

You can try installing Python on a separated path (using the --prefix) from sources, or using pythonbrew, but replacing your system Python with another version is a big no-no.

If you already have python 2.6 installed, you can carefully install the packages from stable. Make double sure that the operation doesn't break something along the way.

Related:

Community
  • 1
  • 1
Braiam
  • 1
  • 11
  • 47
  • 78
  • Thanks for the answer. Actually, I've got the `python2.6` package installed and running just fine. I'm fine with having to call `/usr/bin/python2.6` specifically and not replacing the `/usr/bin/python` link. However, for installing some packages, I'd also need the `-dev` package, similar to the existing `python2.7-dev` package. (That'd go into `/usr/{include,lib}/python2.6/...` if I'm not mistaken, not producing any conflicts). – Boldewyn Nov 20 '13 at 19:14
  • @Boldewyn if you already have libpython2.6 and python2.6, you can carefully try to install python2.6-dev from stable. Apparently, [the files are each one in their own directory](http://packages.debian.org/wheezy/i386/python2.6-dev/filelist), but be careful that the `pre/post.inst` scripts doesn't damage something along the way. You might want to modify your question and tell us that you already have python2.6 installed since that is the mayor draw back in the installation of the development libraries. – Braiam Nov 20 '13 at 19:37
  • OK, that was the way to go. I took the `python2.6-dev` from stable. Worked quite well overall (and my system still boots :-) ). Thanks! – Boldewyn Nov 21 '13 at 10:04
-1

I know this might seem extreme but if you need 2.6 that badly, try running debian stable in a virtual machine like virtualbox and install 2.6 through that.

  • Thanks for the suggestion. My current set-up uses virtualenv with a specific Python version. If anyhow possible, I'd like to keep it that way. – Boldewyn Nov 20 '13 at 19:15