第一种解决方法(time.out问题):
pip --default-timeout=100 install x
x为下载的模块名
eg.pip --default-timeout=100 install numpy
=================================
第二种解决方法:(解决网速过慢问题time.out)
pip install x -i https://pypi.tuna.tsinghua.edu.cn/simple
x 为需要下载的包名 -i后面为清华园镜像网址
=====================================
第三种解决方法(缺少相应的包):
出现 ERROR:Could not build wheels for pandas, which is required to install pyproject.toml-based
到 https://www.lfd.uci.edu/~gohlke/pythonlibs/ 网站上找到你缺少的包
例如出现 Building wheels for collected packages: psutil
找出
会出现
多个版本如果不知道自己适合哪个版本可用
pip debug –verbose在控制面版查看
下载你需要的版本,然后再控制面板输入:
pip install .whl文件的绝对路径
然后接着下载你需要的东西就ok了
第四种(pip提示版本低需要升级,WARNING: You are using pip version 20.1.1; however,version 20.2.3 is available.)
这个问题我在网上看了各种方法,用各种命令都失败,最后我到Python官网(Python Release Python 3.8.5 | Python.org)下载目前最新Python 3.8.5的64位安装程序
或python -m pip install --upgrade pip
但需要找到控制面板以管理员运行
如果失败尝试1.不要直接win+R然后cmd,而是要选择“开始”—“Windows系统”—“命令提示符”—右键“以管理员身份运行”!!!
2.不要用家用WiFi,开手机热点连接!!!
3.管理员身份运行命令提示符后,使用镜像下载升级!!!代码如下:
python -m pip install --upgrade pip -i https://pypi.douban.com/simple