python - pygame 看起来像一个文件名,但该文件不存在
问题描述
我决定尝试安装 pygame 并遇到了这个问题:
Requirement 'pygame-1.9.3-cp37-cp37m-win32.whl' looks like a filename, but the file does not exist
pygame-1.9.3-cp37-cp37m-win32.whl is not a supported wheel on this platform.
到目前为止一切正常,我非常接近安装 pygame。这也是我输入的内容:
pip install pygame-1.9.3-cp37-cp37m-win32.whl
解决方案
您通常使用 pip 之类的工具来安装轮子。如果这是用于托管在 PyPI 上的项目,则将其留给工具来发现和下载文件。为此,您需要安装 wheel 包:
Pip install wheel
然后,您可以告诉 pip 安装项目(如果可用,它将下载轮子),或者直接安装轮子文件:
pip install project_name # discover, download and install
pip install wheel_file.whl # directly install the wheel
wheel 模块一旦安装,也可以从命令行运行,您可以使用它来安装已经下载的轮子:
python -m wheel install wheel_file.whl
另请参阅轮子项目文档。
推荐阅读
- tensorflow - 重新训练 MobilnetSSD v1 TensorFlow 时结果不佳
- c++ - Cout 是空的,我不知道为什么
- java - 模式不允许包含数字的单词?
- javascript - 将不同的 URL 分配给不同的 ID
- azure - 如何使用 Azure DevOps 阶段的 Docker 映像?
- smtp - 无法通过 PHP 验证 SMTP
- excel - 在具有可变范围的列中查找重复项并在单独的列中计数
- javascript - 如何使用单行递归地将属性添加到 Javascript 数组?
- ansible - Ansible:使用节点锚点和合并键拆分不同的 yaml 文件
- node-config - 如何使用 node-config 从数组中获取项目属性