pycharm创建虚拟环境,以及虚拟环境安装报错,Could not fetch URL

pycharm创建虚拟环境

提示目录不为空
pycharm创建虚拟环境,以及虚拟环境安装报错,Could not fetch URL_第1张图片
增加env即可
pycharm创建虚拟环境,以及虚拟环境安装报错,Could not fetch URL_第2张图片

虚拟环境安装报错

ERROR: Could not find a version that satisfies the requirement pypiwin32 (from versions: none)
ERROR: No matching distribution found for pypiwin32
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://mirror.baidu.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirror.baidu.com', port=443): Max retries e
xceeded with url: /pypi/simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

解决方案1

pip install packageName  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

或者

pip install paddlenlp -i https://mirror.baidu.com/pypi/simple --trusted-host mirror.baidu.com

解决方案2,直接写入配置文件

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
pip3 config set global.index-url https://mirror.baidu.com/pypi/simple
pip3 config set install.trusted-host https://mirror.baidu.com

你可能感兴趣的:(笔记,工具,1024程序员节)