Question Installing latest Python

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Apr 29 01:57:09 EDT 2015


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 at 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




More information about the Python-list mailing list