Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #89418 > unrolled thread

Question Installing latest Python

Started byΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
First post2015-04-26 08:00 -0700
Last post2015-05-01 05:22 -0700
Articles 16 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-26 08:00 -0700
    Re: Question Installing latest Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-27 01:05 +1000
      Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-26 08:11 -0700
        Re: Question Installing latest Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-28 00:55 +1000
          Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-28 00:02 -0700
            Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-28 12:26 -0700
              Re: Question Installing latest Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-29 08:43 +1000
                Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-28 19:50 -0700
                  Re: Question Installing latest Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-29 15:57 +1000
                    Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-28 23:13 -0700
                      Re: Question Installing latest Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-29 16:49 +1000
                        Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-28 23:57 -0700
                          Re: Question Installing latest Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-29 21:42 +1000
                            Re: Question Installing latest Python Chris Angelico <rosuav@gmail.com> - 2015-04-29 22:02 +1000
                              Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-04-29 23:00 -0700
                                Re: Question Installing latest Python Φώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com> - 2015-05-01 05:22 -0700

#89418 — Question Installing latest Python

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-26 08:00 -0700
SubjectQuestion Installing latest Python
Message-ID<70cf8ca0-beea-4f01-b962-beab1d54d2fd@googlegroups.com>
Hello, 

Can you please tell me how to install latest Python 3.4.x without disturbing the other default python v2.7.5 intallation that i currently have on my VPS server and access it as Python 3?

Thank you.

[toc] | [next] | [standalone]


#89419

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-04-27 01:05 +1000
Message-ID<553cfec1$0$12998$c3e8da3$5496439d@news.astraweb.com>
In reply to#89418
On Mon, 27 Apr 2015 01:00 am, Φώντας Λαδοπρακόπουλος wrote:

> Hello,
> 
> Can you please tell me how to install latest Python 3.4.x without
> disturbing the other default python v2.7.5 intallation that i currently
> have on my VPS server and access it as Python 3?
> 
> Thank you.

Not unless you tell us more about your setup.

What operating system? Linux, OS X, Unix, Windows?

32-bit or 64-bit OS?

Do you have root/Administrator access to the machine?

If you are running Windows, do you have a C compiler?

Have you read the instructions on the Python web site?



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#89421

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-26 08:11 -0700
Message-ID<c9c7c7ae-e5d8-4340-94fa-7216b353fc39@googlegroups.com>
In reply to#89419
Τη Κυριακή, 26 Απριλίου 2015 - 6:05:50 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:
> On Mon, 27 Apr 2015 01:00 am, Φώντας Λαδοπρακόπουλος wrote:
> 
> > Hello,
> > 
> > Can you please tell me how to install latest Python 3.4.x without
> > disturbing the other default python v2.7.5 intallation that i currently
> > have on my VPS server and access it as Python 3?
> > 
> > Thank you.
>> Not unless you tell us more about your setup.
> What operating system? Linux, OS X, Unix, Windows?
> 32-bit or 64-bit OS?
> Do you have root/Administrator access to the machine?
> If you are running Windows, do you have a C compiler?
> Have you read the instructions on the Python web site?
> 
> -- 
> Steven


Yes, sure:

CentOS 7.1 
x64 bit
Root Access to the VPS

[toc] | [prev] | [next] | [standalone]


#89462

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-04-28 00:55 +1000
Message-ID<553e4dd4$0$13004$c3e8da3$5496439d@news.astraweb.com>
In reply to#89421
On Mon, 27 Apr 2015 01:11 am, Φώντας Λαδοπρακόπουλος wrote:

> Τη Κυριακή, 26 Απριλίου 2015 - 6:05:50 μ.μ. UTC+3, ο χρήστης Steven
> D'Aprano έγραψε:
>> On Mon, 27 Apr 2015 01:00 am, Φώντας Λαδοπρακόπουλος wrote:
>> 
>> > Hello,
>> > 
>> > Can you please tell me how to install latest Python 3.4.x without
>> > disturbing the other default python v2.7.5 intallation that i currently
>> > have on my VPS server and access it as Python 3?
>> > 
>> > Thank you.
>>> Not unless you tell us more about your setup.
>> What operating system? Linux, OS X, Unix, Windows?
>> 32-bit or 64-bit OS?
>> Do you have root/Administrator access to the machine?
>> If you are running Windows, do you have a C compiler?
>> Have you read the instructions on the Python web site?
>> 
>> --
>> Steven
> 
> 
> Yes, sure:
> 
> CentOS 7.1
> x64 bit
> Root Access to the VPS

(1) Go here:

https://www.python.org/downloads/release/python-342/

(2) Choose the source distribution you want. Save it to your hard drive on
the server you will be working on.

(3) Unpack the file. Do you need help with unpacking?

(4) cd into the unpacked directory. Read the README file. Any questions?

(5) Run these three commands from the unpacked directory as a regular user,
not root:

    ./configure
    make
    make test


(6) Take careful note of any errors from those commands. Some warnings and
errors may be harmless. Feel free to ask about them here. You may prefer to
ignore normal output and only see errors:

    ./configure > /dev/null
    make > /dev/null
    make test > /dev/null


If there are any errors you do not understand, STOP! Read the README file
again. Does that tell you how to fix the problem? If not, ask for help
before proceeding.


(7) When you are satisfied that everything is okay run this:

    sudo make altinstall


or if you prefer:

    su 
    make altinstall


(8) Test that everything works as expected by running these two commands:

    python -c "import sys; print sys.executable"

    python3.4 -c "import sys; print(sys.executable)"


You should see something like this:

/bin/python2.7
/usr/local/bin/python3.4




-- 
Steven

[toc] | [prev] | [next] | [standalone]


#89484

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-28 00:02 -0700
Message-ID<b19f41e9-a3f5-47c2-b590-3c7a1e396094@googlegroups.com>
In reply to#89462
First of all Steven thank youvery much for your detailed help.

Secondly prior of seeing your post i tried to folowe a guid and isntall python 3.3.2 for CentOS 7.1 x64 using yum.

The python ould have been installed in 3.3.2 there as yous ay, but instead look: 

[root@secure ~]# /usr/bin/python3 -V 
/usr/bin/python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory 
[root@secure ~]# /opt/rh/python33/root/usr/bin/python -V 
/opt/rh/python33/root/usr/bin/python: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory 
[root@secure ~]# 

I have no ideas as to why python got installed under opt by using yum packaging system.
I created a symlink though to /usr/bin/python3 but as youc an see it give sme error. 

If you want added information please tell me what commands should i issue to paste for you to see. 

I always keep getting this error:
/opt/rh/python33/root/usr/bin/python: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory 

and i have no idea as to why....

[toc] | [prev] | [next] | [standalone]


#89502

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-28 12:26 -0700
Message-ID<a2307bce-678d-4baf-a8d9-cb56278ff8bb@googlegroups.com>
In reply to#89484
Τη Τρίτη, 28 Απριλίου 2015 - 10:02:24 π.μ. UTC+3, ο χρήστης Φώντας Λαδοπρακόπουλος έγραψε:
> First of all Steven thank youvery much for your detailed help.
> 
> Secondly prior of seeing your post i tried to folowe a guid and isntall python 3.3.2 for CentOS 7.1 x64 using yum.
> 
> The python ould have been installed in 3.3.2 there as yous ay, but instead look: 
> 
> [root@secure ~]# /usr/bin/python3 -V 
> /usr/bin/python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory 
> [root@secure ~]# /opt/rh/python33/root/usr/bin/python -V 
> /opt/rh/python33/root/usr/bin/python: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory 
> [root@secure ~]# 
> 
> I have no ideas as to why python got installed under opt by using yum packaging system.
> I created a symlink though to /usr/bin/python3 but as youc an see it give sme error. 
> 
> If you want added information please tell me what commands should i issue to paste for you to see. 
> 
> I always keep getting this error:
> /opt/rh/python33/root/usr/bin/python: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory 
> 
> and i have no idea as to why....

Should i remove the package with yum and try the build from scracth method you posted otr is there is a way to reloves this error Steven?

[toc] | [prev] | [next] | [standalone]


#89505

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-04-29 08:43 +1000
Message-ID<55400cf5$0$13009$c3e8da3$5496439d@news.astraweb.com>
In reply to#89502
On Wed, 29 Apr 2015 05:26 am, Φώντας Λαδοπρακόπουλος wrote:

> Τη Τρίτη, 28 Απριλίου 2015 - 10:02:24 π.μ. UTC+3, ο χρήστης Φώντας
> Λαδοπρακόπουλος έγραψε:
>> First of all Steven thank youvery much for your detailed help.
>> 
>> Secondly prior of seeing your post i tried to folowe a guid and isntall
>> python 3.3.2 for CentOS 7.1 x64 using yum.


What command did you use to install with yum?


>> The python ould have been installed in 3.3.2 there as yous ay, but
>> instead look:
>> 
>> [root@secure ~]# /usr/bin/python3 -V
>> /usr/bin/python3: error while loading shared libraries:
>> libpython3.3m.so.1.0: cannot open shared object file: No such file or
>> directory
>> [root@secure ~]# /opt/rh/python33/root/usr/bin/python -V
>> /opt/rh/python33/root/usr/bin/python: error while loading shared
>> libraries: libpython3.3m.so.1.0: cannot open shared object file: No such
>> file or directory
>> [root@secure ~]#

Run these commands:

cd /tmp
python3 -c "import sys; print(sys.executable)"


What output do you get?


> Should i remove the package with yum and try the build from scracth method
> you posted otr is there is a way to reloves this error Steven?

No, do not remove the yum package yet. If you are satisfied with Python 3.3
the yum package is better than installing from source.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#89509

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-28 19:50 -0700
Message-ID<4d416348-6918-4674-b0c6-7ac2c04c5307@googlegroups.com>
In reply to#89505
The guide i followed is this one: https://devops.profitbricks.com/tutorials/install-python-3-in-centos-7/

The actual command i used to install Python 3.3.2 was this one:
"yum -y install python33"

===========================
[root@secure tmp]# python3 -c "import sys; print(sys.executable)" 

python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file object.

===========================

I have created a symlink thougght to point to:

[root@secure tmp]# ll /usr/bin/python3 
lrwxrwxrwx 1 root root 36 Apr 27 04:23 /usr/bin/python3 -> /opt/rh/python33/root/usr/bin/python

but even this one:

[root@secure tmp]# /usr/bin/python3 -V
/usr/bin/python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory

FAILED to load.

==============================

It seems that python33 is a linked executable and when you run a dynamically (as opposed to statically) linked executable, the executable has to be able to find and load the library files which it needs to run when it is launched. 

And this one doesn't for some reason.

[toc] | [prev] | [next] | [standalone]


#89515

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-04-29 15:57 +1000
Message-ID<554072b7$0$11102$c3e8da3@news.astraweb.com>
In reply to#89509
On Wednesday 29 April 2015 12:50, Φώντας Λαδοπρακόπουλος wrote:

> The guide i followed is this one:
> https://devops.profitbricks.com/tutorials/install-python-3-in-centos-7/
> 
> The actual command i used to install Python 3.3.2 was this one:
> "yum -y install python33"
> 
> ===========================
> [root@secure tmp]# python3 -c "import sys; print(sys.executable)"
> 
> python3: error while loading shared libraries: libpython3.3m.so.1.0:
> cannot open shared object file: No such file object.


Okay, I googled that error message and I think I understand what is failing, 
even though I don't understand why it is failing.

First, run this as root:

ldconfig

That will tell your system to cache any shared libraries it knows about. yum 
is supposed to do that for you, but perhaps it didn't. Now try running the 
python3 test above. Does it work? Then the problem is solved and you can 
stop reading.

If you get the same error, then run this as root:

find /opt -name libpython3.3m.so.1.0

If it returns a single result, that's good. If it returns no results, try 
this instead:

find / -name libpython3.3m.so.1.0 2> /dev/null

It may take a while: it's going to search your entire hard drive. Hopefully 
that will return a single result: let's say it returns

/this/that/libpython3.3m.so.1.0

then you need to edit /etc/ld.so.conf and add this line to the end:

/this/that


Save your changes, run ldconfig again, and hopefully python3 will now work.


-- 
Steve

[toc] | [prev] | [next] | [standalone]


#89517

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-28 23:13 -0700
Message-ID<61c897c7-d5bc-4c14-8c38-9850981a8858@googlegroups.com>
In reply to#89515
Τη Τετάρτη, 29 Απριλίου 2015 - 8:57:25 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:

> Okay, I googled that error message and I think I understand what is failing, 
> even though I don't understand why it is failing.
> 
> First, run this as root:
> 
> ldconfig
> 
> That will tell your system to cache any shared libraries it knows about. yum 
> is supposed to do that for you, but perhaps it didn't. Now try running the 
> python3 test above. Does it work? Then the problem is solved and you can 
> stop reading.
> 
> If you get the same error, then run this as root:
> 
> find /opt -name libpython3.3m.so.1.0


Hello Steven,

I'am at that point, where the find outputed just 1 result.
i run ldconfig but i still got the same error message.

Should i have done somethign with '/etc/ld.so.conf' althought it have returned just 1 result or that was for more results?

[toc] | [prev] | [next] | [standalone]


#89519

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-04-29 16:49 +1000
Message-ID<55407f05$0$2924$c3e8da3$76491128@news.astraweb.com>
In reply to#89517
On Wednesday 29 April 2015 16:13, Φώντας Λαδοπρακόπουλος wrote:

> Τη Τετάρτη, 29 Απριλίου 2015 - 8:57:25 π.μ. UTC+3, ο χρήστης Steven
> D'Aprano έγραψε:
> 
>> Okay, I googled that error message and I think I understand what is
>> failing, even though I don't understand why it is failing.
>> 
>> First, run this as root:
>> 
>> ldconfig
>> 
>> That will tell your system to cache any shared libraries it knows about.
>> yum is supposed to do that for you, but perhaps it didn't. Now try
>> running the python3 test above. Does it work? Then the problem is solved
>> and you can stop reading.
>> 
>> If you get the same error, then run this as root:
>> 
>> find /opt -name libpython3.3m.so.1.0
> 
> 
> Hello Steven,
> 
> I'am at that point, where the find outputed just 1 result.
> i run ldconfig but i still got the same error message.
> 
> Should i have done somethign with '/etc/ld.so.conf' althought it have
> returned just 1 result or that was for more results?


Run:

find /opt -name libpython3.3m.so.1.0

as root. If it returns NO results, you will have to run this instead:

find / -name libpython3.3m.so.1.0 2> /dev/null

But if it returns ONE result, take that result and extract the path. Say it 
returns:

/this/that/libpython3.3m.so.1.0


then the path you want is /this/that (without the / at the end). Edit 
/etc/ld.so.conf and add this line to the end:

/this/that

Save your changes, run ldconfig again, and hopefully python3 will now work.


If ldconfig gives you any errors, tell us what they are.



-- 
Steve

[toc] | [prev] | [next] | [standalone]


#89524

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-28 23:57 -0700
Message-ID<45e48150-1ebc-40aa-90b0-af18109d33da@googlegroups.com>
In reply to#89519
Τη Τετάρτη, 29 Απριλίου 2015 - 9:49:50 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:
> On Wednesday 29 April 2015 16:13, Φώντας Λαδοπρακόπουλος wrote:
> 
> > Τη Τετάρτη, 29 Απριλίου 2015 - 8:57:25 π.μ. UTC+3, ο χρήστης Steven
> > D'Aprano έγραψε:
> > 
> >> Okay, I googled that error message and I think I understand what is
> >> failing, even though I don't understand why it is failing.
> >> 
> >> First, run this as root:
> >> 
> >> ldconfig
> >> 
> >> That will tell your system to cache any shared libraries it knows about.
> >> yum is supposed to do that for you, but perhaps it didn't. Now try
> >> running the python3 test above. Does it work? Then the problem is solved
> >> and you can stop reading.
> >> 
> >> If you get the same error, then run this as root:
> >> 
> >> find /opt -name libpython3.3m.so.1.0
> > 
> > 
> > Hello Steven,
> > 
> > I'am at that point, where the find outputed just 1 result.
> > i run ldconfig but i still got the same error message.
> > 
> > Should i have done somethign with '/etc/ld.so.conf' althought it have
> > returned just 1 result or that was for more results?
> 
> 
> Run:
> 
> find /opt -name libpython3.3m.so.1.0
> 
> as root. If it returns NO results, you will have to run this instead:
> 
> find / -name libpython3.3m.so.1.0 2> /dev/null
> 
> But if it returns ONE result, take that result and extract the path. Say it 
> returns:
> 
> /this/that/libpython3.3m.so.1.0
> 
> 
> then the path you want is /this/that (without the / at the end). Edit 
> /etc/ld.so.conf and add this line to the end:
> 
> /this/that
> 
> Save your changes, run ldconfig again, and hopefully python3 will now work.
> 
> 
> If ldconfig gives you any errors, tell us what they are.
> 
> 
> 
> -- 
> Steve

Thank you very much Steven!

Indeed it worked!!

One last thing. Can you please explain to me inplain English what exactly was that weird problem?

[toc] | [prev] | [next] | [standalone]


#89541

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-04-29 21:42 +1000
Message-ID<5540c3bd$0$12998$c3e8da3$5496439d@news.astraweb.com>
In reply to#89524
On Wed, 29 Apr 2015 04:57 pm, Φώντας Λαδοπρακόπουλος wrote:

> Thank you very much Steven!
> 
> Indeed it worked!!
> 
> One last thing. Can you please explain to me inplain English what exactly
> was that weird problem?

Probably not. I'm not a C expert and don't really understand in full detail
how dynamic shared libraries work.

I *think* the problem was that Python was built to use dynamic libraries,
but couldn't find them. I'm not sure how that works at the C level, but my
guess is that it is something like importing a Python module. The Python
executable couldn't find the libpython3.3m.so.1.0 shared library, so you
used ldconfig to tell it where to find it.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#89544

FromChris Angelico <rosuav@gmail.com>
Date2015-04-29 22:02 +1000
Message-ID<mailman.84.1430308927.3680.python-list@python.org>
In reply to#89541
On Wed, Apr 29, 2015 at 9:42 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Wed, 29 Apr 2015 04:57 pm, Φώντας Λαδοπρακόπουλος wrote:
>
>> Thank you very much Steven!
>>
>> Indeed it worked!!
>>
>> One last thing. Can you please explain to me inplain English what exactly
>> was that weird problem?
>
> Probably not. I'm not a C expert and don't really understand in full detail
> how dynamic shared libraries work.
>
> I *think* the problem was that Python was built to use dynamic libraries,
> but couldn't find them. I'm not sure how that works at the C level, but my
> guess is that it is something like importing a Python module. The Python
> executable couldn't find the libpython3.3m.so.1.0 shared library, so you
> used ldconfig to tell it where to find it.

I haven't been seeing posts from Φώντας, only the replies from Steven,
so I'm guessing something isn't crossing the news->mailing list
boundary for some reason. As a result, my understanding of the problem
is a bit spotty, but it seems there may be a chroot involved here.

>> [root@secure ~]# /opt/rh/python33/root/usr/bin/python -V
>> /opt/rh/python33/root/usr/bin/python: error while loading shared
>> libraries: libpython3.3m.so.1.0: cannot open shared object file: No such
>> file or directory

So it's possible that the chroot didn't have the correct
/etc/ld.so.conf.d entry for your Python binary, and thus the dynamic
linker couldn't find the shared library.

Beyond that, I don't really know enough about what's going on, sorry.
But maybe that's a starting point for an investigation.

ChrisA

[toc] | [prev] | [next] | [standalone]


#89604

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-04-29 23:00 -0700
Message-ID<a1345e0e-67d8-447f-b147-c9001a7838e2@googlegroups.com>
In reply to#89544
Τη Τετάρτη, 29 Απριλίου 2015 - 3:02:18 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Wed, Apr 29, 2015 at 9:42 PM, Steven D'Aprano
> <steve+comp.lang.python@pearwood.info> wrote:
> > On Wed, 29 Apr 2015 04:57 pm, Φώντας Λαδοπρακόπουλος wrote:
> >
> >> Thank you very much Steven!
> >>
> >> Indeed it worked!!
> >>
> >> One last thing. Can you please explain to me inplain English what exactly
> >> was that weird problem?
> >
> > Probably not. I'm not a C expert and don't really understand in full detail
> > how dynamic shared libraries work.
> >
> > I *think* the problem was that Python was built to use dynamic libraries,
> > but couldn't find them. I'm not sure how that works at the C level, but my
> > guess is that it is something like importing a Python module. The Python
> > executable couldn't find the libpython3.3m.so.1.0 shared library, so you
> > used ldconfig to tell it where to find it.
> 
> I haven't been seeing posts from Φώντας, only the replies from Steven,
> so I'm guessing something isn't crossing the news->mailing list
> boundary for some reason. As a result, my understanding of the problem
> is a bit spotty, but it seems there may be a chroot involved here.
> 
> >> [root@secure ~]# /opt/rh/python33/root/usr/bin/python -V
> >> /opt/rh/python33/root/usr/bin/python: error while loading shared
> >> libraries: libpython3.3m.so.1.0: cannot open shared object file: No such
> >> file or directory
> 
> So it's possible that the chroot didn't have the correct
> /etc/ld.so.conf.d entry for your Python binary, and thus the dynamic
> linker couldn't find the shared library.
> 
> Beyond that, I don't really know enough about what's going on, sorry.
> But maybe that's a starting point for an investigation.
> 
> ChrisA

No that you are mentioning it Chris, indeed the path to the shared libray seems weird.

 /opt/rh/python33/root/usr/bin/python

if we break it it will be

/opt/rh/python33   
and
/root/usr/bin/python

Weird installation path used by yum packaging system and indeed looked like chroot was used although i have never chrooted in my CentOS VPS.

Any ideas as to how we cna investigate this?

[toc] | [prev] | [next] | [standalone]


#89727

FromΦώντας Λαδοπρακόπουλος <nikos.gr33k@gmail.com>
Date2015-05-01 05:22 -0700
Message-ID<3e9ce888-49c2-4190-9345-ca0fe0f2d8ee@googlegroups.com>
In reply to#89604
Τη Πέμπτη, 30 Απριλίου 2015 - 9:00:51 π.μ. UTC+3, ο χρήστης Φώντας Λαδοπρακόπουλος έγραψε:
> Τη Τετάρτη, 29 Απριλίου 2015 - 3:02:18 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> > On Wed, Apr 29, 2015 at 9:42 PM, Steven D'Aprano
> > <steve+comp.lang.python@pearwood.info> wrote:
> > > On Wed, 29 Apr 2015 04:57 pm, Φώντας Λαδοπρακόπουλος wrote:
> > >
> > >> Thank you very much Steven!
> > >>
> > >> Indeed it worked!!
> > >>
> > >> One last thing. Can you please explain to me inplain English what exactly
> > >> was that weird problem?
> > >
> > > Probably not. I'm not a C expert and don't really understand in full detail
> > > how dynamic shared libraries work.
> > >
> > > I *think* the problem was that Python was built to use dynamic libraries,
> > > but couldn't find them. I'm not sure how that works at the C level, but my
> > > guess is that it is something like importing a Python module. The Python
> > > executable couldn't find the libpython3.3m.so.1.0 shared library, so you
> > > used ldconfig to tell it where to find it.
> > 
> > I haven't been seeing posts from Φώντας, only the replies from Steven,
> > so I'm guessing something isn't crossing the news->mailing list
> > boundary for some reason. As a result, my understanding of the problem
> > is a bit spotty, but it seems there may be a chroot involved here.
> > 
> > >> [root@secure ~]# /opt/rh/python33/root/usr/bin/python -V
> > >> /opt/rh/python33/root/usr/bin/python: error while loading shared
> > >> libraries: libpython3.3m.so.1.0: cannot open shared object file: No such
> > >> file or directory
> > 
> > So it's possible that the chroot didn't have the correct
> > /etc/ld.so.conf.d entry for your Python binary, and thus the dynamic
> > linker couldn't find the shared library.
> > 
> > Beyond that, I don't really know enough about what's going on, sorry.
> > But maybe that's a starting point for an investigation.
> > 
> > ChrisA
> 
> No that you are mentioning it Chris, indeed the path to the shared libray seems weird.
> 
>  /opt/rh/python33/root/usr/bin/python
> 
> if we break it it will be
> 
> /opt/rh/python33   
> and
> /root/usr/bin/python
> 
> Weird installation path used by yum packaging system and indeed looked like chroot was used although i have never chrooted in my CentOS VPS.
> 
> Any ideas as to how we cna investigate this?

?!

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web