Build Python 2.7 version >= 2.7.15 on Debian 9

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Build Python 2.7 version >= 2.7.15 on Debian 9

ellis.magaud@pp.inet.fi
Hi,

I would need help to build & install Python 2.7 with version greater or equal to 2.7.15 on Debian 9.

I succeeded in doing so from original Python 2.7.15 source but get failed dependancies when adding already packaged modules such as numpy, matplotlib and protobuf. My program fails on include modules statements.

I try all possible hacks to pass each failure, but there is no methodology in this approach.

What is the correct way to build a clean version of python2.7 on Debian9 that will be compatible with already packaged python2.7 modules?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Build Python 2.7 version >= 2.7.15 on Debian 9

Jeremy Stanley
On 2020-04-03 23:21:25 +0300 (+0300), [hidden email] wrote:
[...]
> What is the correct way to build a clean version of python2.7 on
> Debian9 that will be compatible with already packaged python2.7
> modules?

The Python modules with C extensions packaged in Debian are built
against the Python development library headers for the version of
the Python interpreter which is packaged in Debian. If you replace
the interpreter with a different version I expect you'll at least
have to relink, if not entirely recompile, those extensions against
newer headers. I don't personally know a way to go about that short
of rebuilding those additional modules from source. You might be
better off switching to a newer version of Debian which provides a
newer Python 2.7 release and has the other packages you need already
built against it, or using some other Python package management
solution like conda or virtualenv.
--
Jeremy Stanley

signature.asc (981 bytes) Download Attachment