MulticoreTSNE安裝
MulticoreTSNE安裝極易報錯
ModuleNotFoundError: No module named 'MulticoreTSNE'
需先進(jìn)行特定版本的cmake安裝
pip install cmake==3.18.4
然后
pip install?MulticoreTSNE
在實際運(yùn)行的時候報錯
Cannot find/open tsne_multicore shared library
cannot load library '/xxxx/miniconda3/xxx/site-packages/MulticoreTSNE/libtsne_multicore.so':
?/xxxx/miniconda3/xxx/site-packages/scipy/_lib/_uarray/../../../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found
?(required by /xxxx/miniconda3/xxx/site-packages/MulticoreTSNE/libtsne_multicore.so)
確認(rèn)錯誤來源
$ real path /xxxxx/miniconda3/xxx/scipy/_lib/_uarray/../../../../../libstdc++.so.6
$ /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26
$ strings /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26? | grep GLIBCXX_3.4.29
$ # return nothing
查找miniconda中有的動態(tài)庫
find /home/xxx/tools/miniconda3 -name libstdc++.so.6
strings /home/xxx/tools/miniconda3/envs/i2v/lib/libstdc++.so.6 | grep GLIBCXX_3.4.29
找到后進(jìn)行替換
$ mv /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26 /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26_bak
$ ln -s /usr/lib/libstdc++.so.6.0.29 /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26
再次運(yùn)行就可以了。
因此可以從頭開始,
pip uninstall cmake
pin install cmake
pip uninstall multicoretsne
pip install MulticoreTSNE
按照前述的方法替換GLIBCXX_3.4.29
重新加載python環(huán)境再次運(yùn)行即可。