1 conda环境下运行python程序报错
conda环境下运行python所报的错误信息如下:
Traceback (most recent call last):
File "/opt/faceswap/lib/cli/launcher.py", line 229, in execute_script
process = script(arguments)
File "/opt/faceswap/scripts/extract.py", line 61, in __init__
self._extractor = Extractor(self._args.detector,
File "/opt/faceswap/plugins/extract/pipeline.py", line 135, in __init__
self._detect = self._load_detect(detector, rotate_images, min_size, configfile)
File "/opt/faceswap/plugins/extract/pipeline.py", line 637, in _load_detect
plugin = PluginLoader.get_detector(detector_name)(exclude_gpus=self._exclude_gpus,
File "/opt/faceswap/plugins/plugin_loader.py", line 55, in get_detector
return PluginLoader._import("extract.detect", name, disable_logging)
File "/opt/faceswap/plugins/plugin_loader.py", line 197, in _import
module = import_module(mod)
File "/root/anaconda3/envs/faceswap/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/opt/faceswap/plugins/extract/detect/s3fd.py", line 11, in <module>
from scipy.special import logsumexp
File "/root/anaconda3/envs/faceswap/lib/python3.9/site-packages/scipy/special/__init__.py", line 663, in <module>
from . import _ufuncs
File "_ufuncs.pyx", line 1, in init scipy.special._ufuncs
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /root/anaconda3/envs/face

文章描述了一个在conda环境下运行Python程序时遇到的错误,该错误由于系统缺少GLIBCXX_3.4.20版本的libstdc++.so.6导致。作者通过检查GLIBCXX的版本,发现系统中没有该版本。然后,作者通过查找conda环境中的高版本库,将其复制到系统路径并创建软链接,成功解决了问题。此外,文章还介绍了conda环境管理器的基本功能和优势,以及如何创建和管理环境。
最低0.47元/天 解锁文章
652





