AWS SageMaker运行conda env list时出现X509_V_FLAG_CB_ISSUER_CHECK属性错误
解决AWS SageMaker中
conda env list报错AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'的方案 问题原因
该错误多由pyopenssl版本与SageMaker环境自带的OpenSSL库不兼容导致,或是pip安装的pyopenssl覆盖了conda管理的对应包,引发依赖调用冲突。
具体解决步骤
- 卸载pip安装的
pyopenssl,消除包管理冲突:pip uninstall -y pyopenssl - 用conda重新安装适配环境的
pyopenssl:conda install -y -c conda-forge pyopenssl - 若上述步骤无效,重置conda SSL配置:
conda config --remove-key ssl_verify conda config --set ssl_verify true - 验证修复效果:
conda env list
补充提示
SageMaker默认环境中,conda与pip的包管理易产生冲突,优先使用conda安装、更新SSL类底层依赖,避免用pip直接修改这类库,防止破坏环境依赖链。
内容的提问来源于stack exchange,提问作者PeeteKeesel
相关产品推荐
相关产品推荐

