Reputation: 125
Thanks for your patience, this question has not been answered anywhere on the internet and I am unable to find any clues on how to fix it. The problem is:
[jv@xp ~]$ /usr/bin/python3
/usr/bin/python3: symbol lookup error: /usr/bin/python3: undefined symbol: _Py_CoerceLegacyLocale
Before this happened I was fixing problems with anaconda3 python environments so there may be a connection there.
It is the new Fedora 27 system python3 that all the packaging systems(yum, dnf) depends on, so if I am unable to fix it, it is probably better to re-install the whole system.(Which will probably mean that with a face of defeat, looking down I ll go back to mint :-/ )
Here this gentleman is battling the same problem:
Thanks for your help. Any clues and advice will be greatly appreciated.
Upvotes: 3
Views: 18708
Reputation: 71565
This happened to me when I built and installed my own Python-3.6.15 on a RHEL8 system.
The problem is that Red Hat back-ported PEP538 to their python3.6 RPM. Look for 00262-pep538_coerce_legacy_c_locale.patch
in the python3-3.6.8 SRPM, which is where these LegacyLocale functions are defined.
You will need to apply this patch if you want to rebuild Python 3.6 and wind up with a libpython3.6m.so
that is compatible with the rest of the RHEL8 runtime.
Upvotes: 1
Reputation: 21
While conda update intel-openmp
didn't work for me;
conda install --channel conda-forge llvm-openmp
worked for me.
Upvotes: 0
Reputation: 61
I had the same problem after installing python3 via conda. What I did to solve this problem was to :
1/ Reinstall python3, python3-libs and system-python with the following command :
python2 /usr/bin/yum reinstall python3-libs
(note that you can still run dnf and yum with python2, assuming that only python3 was broken)
2/ Remove the following files :
The command rpm -qf libpython3.6m.so
says that those files do not belong to any package. They were surely installed via conda.
The problem was that the python3 executable loaded these shared libraries instead of the good ones.
Upvotes: 6