Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 使用pip在python中下载flask包时出错_Python 3.x_Pip - Fatal编程技术网

Python 3.x 使用pip在python中下载flask包时出错

Python 3.x 使用pip在python中下载flask包时出错,python-3.x,pip,Python 3.x,Pip,我正在尝试在python3中安装flask。在给出命令python-mpipinstallflask时,我得到了错误 重试(重试(总计=4,连接=无,读取=无,重定向=无, 状态=无)连接被“SSLError”(SSLError(1),[SSL: 证书\u验证\u失败]证书验证失败 (_ssl.c:748)、):/simple/flask/Retry(Retry(总计=3, 连接后,连接=无,读取=无,重定向=无,状态=无 被“SSLError”(SSLError(1),[SSL:CERTIFI

我正在尝试在
python3
中安装
flask
。在给出命令python-mpipinstallflask时,我得到了错误

重试(重试(总计=4,连接=无,读取=无,重定向=无, 状态=无)连接被“SSLError”(SSLError(1),[SSL: 证书\u验证\u失败]证书验证失败 (_ssl.c:748)、):/simple/flask/Retry(Retry(总计=3, 连接后,连接=无,读取=无,重定向=无,状态=无 被“SSLError”(SSLError(1),[SSL:CERTIFICATE\u VERIFY\u FAILED] 证书验证失败(_ssl.c:748)”)”:/simple/flask/Retrying (重试(总计=2,连接=无,读取=无,重定向=无,状态=无)) 连接被“SSLError(SSLError(1)”[SSL: 证书\u验证\u失败]证书验证失败 (_ssl.c:748)、):/simple/flask/Retry(Retry(总计=1, 连接后,连接=无,读取=无,重定向=无,状态=无 被“SSLError”(SSLError(1),[SSL:CERTIFICATE\u VERIFY\u FAILED] 证书验证失败(_ssl.c:748)”)”:/simple/flask/Retrying (重试(总计=0,连接=无,读取=无,重定向=无,状态=无)) 连接被“SSLError(SSLError(1)”[SSL: 证书\u验证\u失败]证书验证失败 (_ssl.c:748)”):/simple/flask/无法获取URL 当前位置确认时出现问题 ssl证书:HTTPSConnectionPool(host='pypi.python.org', 端口=443):url:/simple/flask/(导致的)超出了最大重试次数 SSLError(SSLError(1),[SSL:证书\u验证\u失败]证书 验证失败(_ssl.c:748)”)-跳过找不到版本 满足要求的烧瓶(来自版本:)不匹配 找到烧瓶的分布


以下是工作解决方案:

python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
您可以安装任何pkg替换“-upgrade pip”

对于永久解决方案,您需要编辑pip.ini文件并添加以下内容:

[global]
trusted-host=
    pypi.python.org
    pypi.org
    files.pythonhosted.org

以下是工作解决方案:

python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
您可以安装任何pkg替换“-upgrade pip”

对于永久解决方案,您需要编辑pip.ini文件并添加以下内容:

[global]
trusted-host=
    pypi.python.org
    pypi.org
    files.pythonhosted.org

可能重复的可能重复的可能重复的可能重复的我在site packages目录中没有看到pip.ini。你能告诉我它在哪里吗?试着运行“pip-config-vvv-list”,我在site-packages目录中没有看到pip.ini。你能告诉我它在哪里吗?试着运行“pip配置-vvv列表”