python - PIP 在尝试安装软件包时显示错误
问题描述
我在我的系统(3.10)上安装了最新版本的 Python,当我尝试安装 python 包时 pip 显示错误。例如,当我安装 Pygame 时,我收到以下错误:
Path for FREETYPE not found.
...Found include dir but no library dir in prebuilt-x64.
和:
WARNING: Discarding https://files.pythonhosted.org/packages/da/b8/b110cdea95452f8f9f9e79d02062fdccaebfd808a
667d6d9a805ca8d222a/pygame-1.9.2.tar.gz#sha256=2050c68ff6eba1f801efc14fd1f805aaa3a94936c80ed6725b64a75ca1bce
66f (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py
egg_info Check the logs for full command output.
它会尝试安装以前的版本。我在 Windows 11 电脑上。我该如何解决这个问题?
解决方案
你有没有将python添加到路径中?如果您尚未将 Python 添加到路径,请观看此视频: https ://www.youtube.com/watch?v=UTUlp6L2zkw
推荐阅读
- kubernetes - Kubernetes HPA 无法从 Stackdriver 检测到成功发布的自定义指标
- angular - Angular - GraphQL - 突变(大对象)
- postgresql - 当键不存在时,为什么postgresql会计算重复键?
- arrays - 在 while 循环中将非顺序值传递给存储过程。数组到存储过程
- javascript - 脚本代码不在 foreach 循环中运行?
- javascript - 通过映射数组需要帮助
- javascript - 使用滑块更改两个块的宽度比例
- html - 绝对定位的容器大小以画布作为其子项计算错误
- node.js - 如何将消息从频道转发到电报机器人上的群组?
- rust - Actix SyncArbiter 注册表