安装时提示“the ssl module in Python is not available”

在安装dpgen时运行“pip install --user .”
提示“WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
尝试过安装openssl没有效果,如下所示。
在这里插入图片描述
最后发现还是通过镜像的 HTTP 源来避免 SSL 认证问题

pip install xxx-package -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install xxx-package -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com

如需要运行“pip install --user .
可将其修改为“pip install --user . -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com”即可顺利运行,如下所示。
在这里插入图片描述

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐