我想我搞砸了我的蟒蛇安装

您所在的位置:网站首页 怎么用pip安装pygame 我想我搞砸了我的蟒蛇安装

我想我搞砸了我的蟒蛇安装

2023-04-24 08:02| 来源: 网络整理| 查看: 265

我现在是蟒蛇的初学者。我在VScode工作。在下载python3.11之后,我遇到了VScode中的问题(导入和安装库不起作用)。我意识到我的磁盘上有多个python版本,所以我决定进行一次清除,看看这个问题是否会自行修复。

-What我做了-我查找每一个应用程序和文件中的名字在我的计算机上"python“,并删除了它。我检查了我的环境变量是否有"python“的名称,但是找不到任何东西。我以为我得到了所有的东西,但是当我重新安装python 3.11时,在用pip安装像pygame这样的库时仍然会出现错误。我想我可能搞砸了。

-What我想我需要做-可能有一个文件,我错过了在我的C驱动器,但我将不知道它在哪里。如果这不是问题所在,也许这与VScode和它的设置不更新有关。或者,也许是皮普的问题。我有信心我自己摆脱了pip,但可能还有其他的文件更难识别。我不认为这是一个环境变量问题,因为我看不到它的名字中有"python“。

那我该怎么办?我不太清楚问题出在哪里,也不知道如果我在什么地方搞砸了,该如何回溯。我只知道:

在我安装python3.11之前就已经开始工作了。我使用的旧版本是3.9.12 + 3.10,当我在VScode中调出环境时,3.9.12在它旁边写着“全局”。--当我删除所有东西,只安装3.11时,它就不能正常工作了。

编辑:这是当我试图用pip安装游戏时遇到的错误(很长):

Defaulting to user installation because normal site-packages is not writeable Collecting pygame Using cached pygame-2.1.2.tar.gz (10.1 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [77 lines of output] WARNING, No "Setup" File Exists, Running "buildconfig/config.py" Using WINDOWS configuration... Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\{My Name}\AppData\Local\Temp\pip-install-df9zydxm\pygame_7c731a410ab843a58a7dc3cf14f8979c\setup.py", line 359, in buildconfig.config.main(AUTO_CONFIG) File "C:\Users\{My Name}\AppData\Local\Temp\pip-install-df9zydxm\pygame_7c731a410ab843a58a7dc3cf14f8979c\buildconfig\config.py", line 225, in main deps = CFG.main(**kwds) ^^^^^^^^^^^^^^^^ File "C:\Users\{My Name}\AppData\Local\Temp\pip-install-df9zydxm\pygame_7c731a410ab843a58a7dc3cf14f8979c\buildconfig\config_win.py", line 511, in main return setup_prebuilt_sdl2(prebuilt_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\{My Name}\AppData\Local\Temp\pip-install-df9zydxm\pygame_7c731a410ab843a58a7dc3cf14f8979c\buildconfig\config_win.py", line 471, in setup_prebuilt_sdl2 DEPS.configure() File "C:\Users\{My Name}\AppData\Local\Temp\pip-install-df9zydxm\pygame_7c731a410ab843a58a7dc3cf14f8979c\buildconfig\config_win.py", line 336, in configure from . import vstools File "C:\Users\{My Name}\AppData\Local\Temp\pip-install-df9zydxm\pygame_7c731a410ab843a58a7dc3cf14f8979c\buildconfig\vstools.py", line 11, in compiler.initialize() File "C:\Program Files\Python311\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 403, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 281, in query_vcvarsall raise DistutilsPlatformError("Unable to find vcvarsall.bat") distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat Making dir :prebuilt_downloads: Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip ed561079ec622b0bab5a9e02976f5d540b0622da Unzipping :prebuilt_downloads\SDL2-devel-2.0.18-VC.zip: Downloading... https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip 137f86474691f4e12e76e07d58d5920c8d844d5b Unzipping :prebuilt_downloads\SDL2_image-devel-2.0.5-VC.zip: Downloading... https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zip 1436df41ebc47ac36e02ec9bda5699e80ff9bd27 Unzipping :prebuilt_downloads\SDL2_ttf-devel-2.0.15-VC.zip: Downloading... https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip 9097148f4529cf19f805ccd007618dec280f0ecc Unzipping :prebuilt_downloads\SDL2_mixer-devel-2.0.4-VC.zip: Downloading... https://www.pygame.org/ftp/jpegsr9d.zip ed10aa2b5a0fcfe74f8a6f7611aeb346b06a1f99 Unzipping :prebuilt_downloads\jpegsr9d.zip: Downloading... https://pygame.org/ftp/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed Unzipping :prebuilt_downloads\prebuilt-x64-pygame-1.9.2-20150922.zip: copying into .\prebuilt-x64 Path for SDL: prebuilt-x64\SDL2-2.0.18 ...Library directory for SDL: prebuilt-x64/SDL2-2.0.18/lib/x64 ...Include directory for SDL: prebuilt-x64/SDL2-2.0.18/include Path for FONT: prebuilt-x64\SDL2_ttf-2.0.15 ...Library directory for FONT: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64 ...Include directory for FONT: prebuilt-x64/SDL2_ttf-2.0.15/include Path for IMAGE: prebuilt-x64\SDL2_image-2.0.5 ...Library directory for IMAGE: prebuilt-x64/SDL2_image-2.0.5/lib/x64 ...Include directory for IMAGE: prebuilt-x64/SDL2_image-2.0.5/include Path for MIXER: prebuilt-x64\SDL2_mixer-2.0.4 ...Library directory for MIXER: prebuilt-x64/SDL2_mixer-2.0.4/lib/x64 ...Include directory for MIXER: prebuilt-x64/SDL2_mixer-2.0.4/include Path for PORTMIDI: prebuilt-x64 ...Library directory for PORTMIDI: prebuilt-x64/lib ...Include directory for PORTMIDI: prebuilt-x64/include DLL for SDL2: prebuilt-x64/SDL2-2.0.18/lib/x64/SDL2.dll DLL for SDL2_ttf: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64/SDL2_ttf.dll DLL for SDL2_image: prebuilt-x64/SDL2_image-2.0.5/lib/x64/SDL2_image.dll DLL for SDL2_mixer: prebuilt-x64/SDL2_mixer-2.0.4/lib/x64/SDL2_mixer.dll DLL for portmidi: prebuilt-x64/lib/portmidi.dll Path for FREETYPE not found. ...Found include dir but no library dir in prebuilt-x64. Path for PNG not found. ...Found include dir but no library dir in prebuilt-x64. Path for JPEG not found. ...Found include dir but no library dir in prebuilt-x64. DLL for freetype: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64/libfreetype-6.dll --- For help with compilation see: https://www.pygame.org/wiki/CompileWindows To contribute to pygame development see: https://www.pygame.org/contribute.html --- [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3