473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

separate shared libraries or different Linux/Unix

Hi,

I want to start using Python 2.6 and 3000. I have several questions.

What, in your experiences, is a functionally elegant solution to
installing 2.6 and 3 from source without breaking package dependencies
on your favorite Linux/Unix flavor? Is compiling Python 2.6 and 3.0 on
a *nix development machine and having it work seamlessly as simple as
choosing a particular flavor or are there always going to be package
juggling/mangling/pinning/managing issues affecting the other programs
on the operating system? Is it as simple as choosing a flavor that is
likely to have a Python 3 package available?

Or:

Is there a way to make a copy of shared libraries ( under perhaps /usr/
local/py2.6lib/ and /usr/local/py3lib/ ) so that I can use 2.6 and 3
without causing package problems with other programs within my
operating system? If this seems like a good solution, where can I find
more information about how to implement separate libraries inside the
same OS as appropriate for Python? This might be the better solution
than simply choosing a development flavor of *nix because I am going
to want to install other Python libraries like numpy and matplotlib
from source that might depend on other potentially incompatible shared
libraries than either versions of Python or my Linux/Unix distro ( I
have a feeling I am going to learn how to use ldconfig ).

I have a bit of experience with Debian Etch but I recently garbled my
package management database while compiling the latest version of zlib
for Python 2.6. ( why was I compiling and installing zlib from source?
I was learning another lesson in patience and planning )
Oct 29 '08 #1
4 2321
What, in your experiences, is a functionally elegant solution to
installing 2.6 and 3 from source without breaking package dependencies
on your favorite Linux/Unix flavor? Is compiling Python 2.6 and 3.0 on
a *nix development machine and having it work seamlessly as simple as
choosing a particular flavor or are there always going to be package
juggling/mangling/pinning/managing issues affecting the other programs
on the operating system? Is it as simple as choosing a flavor that is
likely to have a Python 3 package available?
If your distribution provides neither Python 2.6 nor 3.0, then there
shouldn't be any package juggling/mangling/pinning/managing issues
when you build it yourself. Just install it in /usr/local, and be done.

If your distribution does provide those versions, don't build them
yourself at all - just use the distribution ones, and be done.
Is there a way to make a copy of shared libraries ( under perhaps /usr/
local/py2.6lib/ and /usr/local/py3lib/ ) so that I can use 2.6 and 3
without causing package problems with other programs within my
operating system?
You don't need to make copies of shared libraries. Just install
with a prefix of /usr/local, and there won't be any shared library
conflicts. If something invokes the "python" binary without explicit
path, and /usr/local/bin precedes /usr/bin in the path, then it will
pick up your Python interpreter. If you don't want it to, "make
altinstall" instead of "make install" for Python.
If this seems like a good solution, where can I find
more information about how to implement separate libraries inside the
same OS as appropriate for Python?
There is not much information that you need. It Just Works.
This might be the better solution
than simply choosing a development flavor of *nix because I am going
to want to install other Python libraries like numpy and matplotlib
from source that might depend on other potentially incompatible shared
libraries than either versions of Python or my Linux/Unix distro ( I
have a feeling I am going to learn how to use ldconfig ).
Just don't even think of passing --enable-shared to Python's configure,
and it will all work fine, and you won't need to use ldconfig.
I have a bit of experience with Debian Etch but I recently garbled my
package management database while compiling the latest version of zlib
for Python 2.6. ( why was I compiling and installing zlib from source?
I was learning another lesson in patience and planning )
Installing *other* stuff (but Python) from source is something that you
should completely avoid. Instead of installing zlib, you should have
just installed Debian's zlib1g-dev package. Likewise for any other
header files that you will need. The libraries provided by Debian are
sufficient for building Python 2.6 with all extension modules (that
can possibly work on Linux).

Regards,
Martin
Oct 29 '08 #2
>
Just don't even think of passing --enable-shared to Python's configure,
and it will all work fine, and you won't need to use ldconfig.
Well I've done --enable-shared so that I can compile mod_python as a
shared object within apache.
Created /etc/ld.so.conf.d/python2.5.conf on a redhat system, and put /
opt/python/lib
and it works no probs.
>
Installing *other* stuff (but Python) from source is something that you
should completely avoid. Instead of installing zlib, you should have
just installed Debian's zlib1g-dev package. Likewise for any other
header files that you will need. The libraries provided by Debian are
sufficient for building Python 2.6 with all extension modules (that
can possibly work on Linux).
Each to their own. I have a hosted virtual server, and I would like
to get another one for another project.
I want as much built from source as I can manage so that I know what
is and what is not on the system.
zlib is compiled with --enable-shared in /opt/zlib-1.2.3 and I've
ldconfig -n /opt/zlib-1.2.3/lib

I'm compiling python from source, because the server is running redhat
5 which comes with python 2.4
To run trac you need python2.5
I'm running into a problem where zlib is not available even though
there is a copy in /usr/lib/ of the version I compiled.

In /usr/local/src/Python2.5.2 I'm doing:
../configure --enable-shared --prefix=/opt/python --with-zlib=/opt/
zlib-1.2.3
make
make install
When running the setuptools egg, it says zlib unavailable.

Back in the config.log of the Python2.5.2 source directory, it shows
that it's passed in, but in that file there is a --with-system-zlib
How do I get zlib available to python?

Cheers
Nov 4 '08 #3
In message
<37**********************************@w1g2000prk.g ooglegroups.com>,
ch***@mrvoip.com.au wrote:
I want as much built from source as I can manage so that I know what
is and what is not on the system.
Sounds like a job for Gentoo. :)

Nov 4 '08 #4
How do I get zlib available to python?

Edit Modules/Setup, and uncomment the zlib line. At your choice, also
uncomment the *shared* line (otherwise, zlib would become a builtin
module).

When you install shared libraries somewhere that also live in /usr/lib,
do use ldd to verify that it always picks up the libraries you want.

Regards,
Martin
Nov 4 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Christos TZOTZIOY Georgiou | last post by:
Last night I was compiling the latest python snapshot at my home Linux system (a K6-III @420 --the extra 20 Hz is overclocking :); then I tried building a shared version of the interpreter. I did...
1
by: rinku24 | last post by:
We have two C++ libraries (Unix Shared objects) with the same class name and no namespace. Is there any way to load both the libraries and selectivly create the instance of the class from...
1
by: RHNewBie | last post by:
Hello, I have an executable which uses two shared libraries(A and Z). I do not have the source code for the executable. However I can tell the executable to load the shared libraries and invoke...
2
by: Apprentice | last post by:
Hi there, Is there a way in which I can specify at runtime to an application the locations of shared dynamic libraries on which it depends? I do not want to use LD_LIBRARY_PATH or other LD...
2
by: leby | last post by:
Hi all, Thanks for haveing this group. I am in search of a solution to Q. Thought of geeting the same from experts. I have c files to generate shared libraries (not relating to...
1
by: krivenok.dmitry | last post by:
Hello All! I have developed my application and I want to install it on server of my client. Development platform is Gentoo Linux. Target platform is Debian Linux. This is the output of "ldd"...
2
by: Tobias Bergmann | last post by:
Hi, I work on a big project that consists of many small linux C++ CGI binaries. This actually works fine but our problem is that we use many ..so libraries and we need to compile it separately...
3
by: Bala | last post by:
Hello, I am trying to create a shared library on solaris. The inputs to this library is a source file and then 2 static libraries. I need to call code within the shared library in another...
1
by: viraj.kadakia | last post by:
I observe a behavior with shared libraries (.so) and global variables that I cannot understand ... I'd appreciate if someone can explain the behavior .. Scenario 1: aTest is an executable on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.