Python问题-003-依赖包下载与安装失败合集

一、网络超时(Connection timeout
二、找不到指定版本(Could not find a version that satisfies the requirement
三、权限不足(Permission denied
  • 解决办法:
  • 管理员权限安装(Windows:cmd 以管理员运行;Linux/macOS:sudo pip install 包名
  • 使用虚拟环境避免全局权限问题:python -m venv venv → 激活虚拟环境后再安装
四、编译失败(如Microsoft Visual C++ 14.0 is required
五、缓存损坏(Corrupted package cache
滚动至顶部