我正在使用CentOS 6.8并尝试导入sklearn。但是我收到以下错误。
Traceback (most recent call last):
File "DBSCAN.py", line 12, in <module>
import sklearn
File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.4/lib/python3.6/site-packages/sklearn/__init__.py", line 134, in <module>
from .base import clone
File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.4/lib/python3.6/site-packages/sklearn/base.py", line 11, in <module>
from scipy import sparse
File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.4/lib/python3.6/site-packages/scipy/sparse/__init__.py", line 229, in <module>
from .csr import *
File "/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.4/lib/python3.6/site-packages/scipy/sparse/csr.py", line 15, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
我尝试使用yum安装它。
sudo yum install libstdc++-4.4.7-18.el6.i686
[sudo] password for hangh:
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* atomic: mirrors.vbi.vt.edu
* base: mirror.trouble-free.net
* elrepo: iad.mirror.rackspace.com
* epel: mirror.us.leaseweb.net
* extras: mirror.trouble-free.net
* updates: mirror.trouble-free.net
Package libstdc++-4.4.7-18.el6.i686 already installed and latest version