关于python中pip安装库过程中报错的解决办法

晚上使用flask框架搭建web服务,启动后报错如下:

1
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

 经过搜索大法,发现是因为在开发环境中,Flask应用程序是使用内置的服务器(如SimpleServer或Lighttpd)运行的,而不是使用WSGI服务器。于是,尝试安装Gevent和pywsgi库。

1
pip install gevent pywsgi

 结果又报错(好好好)

1
2
ERROR: Could not find a version that satisfies the requirement pywsgi (from versions: none)
ERROR: No matching distribution found for pywsgi

 使用pip更新:

1
python -m pip install --upgrade pip

 更新后再用pip命令安装,又报错:

1
2
ERROR: Could not find a version that satisfies the requirement pywsgi (from versions: none)
ERROR: No matching distribution found for pywsgi

 看样子应该是网络问题,使用指定源进行安装,命令如下:

1
pip3 install [你要安装的包] -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

 最后,问题解决。

本文作者:KEEP12

本文链接:https://www.cnblogs.com/ikillyou/p/17860635.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   KEEP12  阅读(292)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.