Error message Importerror:/lib64/libstdc++.so.6:version ' cxxabi_1.3.9 ' not found (required by

Source: Internet
Author: User

Error message:

Importerror:/lib64/libstdc++.so.6:version ' cxxabi_1.3.9 ' not found
(required by anaconda3/lib/python3.6/ site-packages/scipy/sparse/_sparsetools.cpython-36m-x86_64-linux-gnu.so)

Error location:

Traceback (most recent):
file "xxx.py", line 9, in <module>
import preprocessing
File "/。。 rocessing.py ", line one, in <module>
sklearn.metrics.pairwise import cosine_similarity

The reason for the error: running the python preprossing alone is not an error. The suspicion is that the upgrade of pytorch0.1->0.3 causes some libraries to not update and not correspond.

参考网址:http://libowei.net/ImportError-usr-lib64-libstdc-so-6-version-CXXABI-1-3-7%E2%80%99-not-found.html出现这个问题的原因是没有链接到CXXABI库的最新的版本。下面贴上我的步骤:

Step one: View the dynamic library version under/usr/lib64/with the following command, and find that there is no ' cxxabi_1.3.9 '

[Zs@gpu]$ strings/usr/lib64/libstdc++.so.6 | grep ' Cxxabi '
cxxabi_1.3
cxxabi_1.3.1
cxxabi_1.3.2
cxxabi_1.3.3
cxxabi_1.3.4 cxxabi_ 1.3.5
cxxabi_1.3.6
cxxabi_1.3.7
cxxabi_tm_1

Step two: Find the dynamic library file with the following command: Too many, here only two useful dynamic libraries are posted. Where the 6.0.21 is up to date and contains the required 1.3.9

[zs@gpu]$ Find/-name "libstdc++.so.6*
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19
/ opt/intel/linux/brew/linuxbrew/lib/libstdc++.so.6.0.21

Step Three:

Check [Zs@gpu lib64]$ strings/opt/intel/linux/brew/linuxbrew/lib/libstdc++.so.6.0.21 | grep ' Cxxabi ' can use
cxxabi_1.3
cxxabi_1.3.1
cxxabi_1.3.2
cxxabi_1.3.3
cxxabi_1.3.4
cxxabi_1.3.5
cxxabi_1.3.6
cxxabi_1.3.7
cxxabi_1.3.8
cxxabi_1.3.9
cxxabi_tm_1 cxxabi_float128

Step Four:

$ cp/opt/intel/linux/brew/linuxbrew/lib/libstdc++.so.6.0.21 ~/anaconda3/lib/

Run the program again and find that there are still errors.

The reason: The program did not find the dynamic repository location under Anaconda. is because: the ld_library_path of the individual does not include the path of the Anancoda

Workaround:

$ vim ~/.bash_profile

Add the following code to the file

Ld_library_path=/~/anaconda3/lib: $LD _library_path
Export Ld_library_path
$ source ~/.bash_profile

Run the program you originally wanted to run again.

Success, error resolution. #####################################################################

If you have root permissions, you can manipulate the link library under/usr directly as shown in the link (if not, as shown in the article)

Put the libstdc++.so.6.0.21 below the anaconda containing cxxabi_1.3.9 into the usr/lib64/to relink the upgrade.

###############################################################

There is also an easy way to do this: since the error content is observed to be related to scipy, the scipy and Sklearn are uninstalled and reinstalled.

Run the program you originally wanted to run again.

Success, error resolution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.