首页 > 解决方案 > 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 电脑上。我该如何解决这个问题?

标签: pythonpip

解决方案


你有没有将python添加到路径中?如果您尚未将 Python 添加到路径,请观看此视频: https ://www.youtube.com/watch?v=UTUlp6L2zkw


推荐阅读