国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

[Python]pip install pygame安裝報(bào)錯(cuò)解決方案

這篇具有很好參考價(jià)值的文章主要介紹了[Python]pip install pygame安裝報(bào)錯(cuò)解決方案。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

pip install pygame報(bào)錯(cuò)提示:

Microsoft Windows [版本 10.0.17763.3165]
(c) 2018 Microsoft Corporation。保留所有權(quán)利。
C:\Users\xxxxxxx>pip install pygame
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 "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\xxxxxxx\AppData\Local\Temp\pip-install-zqq3q3ot\pygame_1748e02cad70437b8b99abf25c9b1b20\setup.py", line 359, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\xxxxxxx\AppData\Local\Temp\pip-install-zqq3q3ot\pygame_1748e02cad70437b8b99abf25c9b1b20\buildconfig\config.py", line 225, in main
deps = CFG.main(**kwds)
^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxx\AppData\Local\Temp\pip-install-zqq3q3ot\pygame_1748e02cad70437b8b99abf25c9b1b20\buildconfig\config_win.py", line 511, in main
return setup_prebuilt_sdl2(prebuilt_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxx\AppData\Local\Temp\pip-install-zqq3q3ot\pygame_1748e02cad70437b8b99abf25c9b1b20\buildconfig\config_win.py", line 471, in setup_prebuilt_sdl2
DEPS.configure()
File "C:\Users\xxxxxxx\AppData\Local\Temp\pip-install-zqq3q3ot\pygame_1748e02cad70437b8b99abf25c9b1b20\buildconfig\config_win.py", line 336, in configure
from . import vstools
File "C:\Users\xxxxxxx\AppData\Local\Temp\pip-install-zqq3q3ot\pygame_1748e02cad70437b8b99abf25c9b1b20\buildconfig\vstools.py", line 11, in <module>
compiler.initialize()
File "C:\Python311\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 403, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\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.
WARNING: There was an error checking the latest version of pip.

解決方案:whl安裝

  1. 下載pygame安裝包

下載地址:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

我安裝的python版本3.11.1,win系統(tǒng)64位。

選擇對(duì)應(yīng)版本:pygame?2.1.2?cp311?cp311?win_amd64.whl

  1. 將安裝包放到指定路徑后進(jìn)行安裝

C:\Users\xxxxxxx>Python -m pip install --user pygame-2.1.2-cp311-cp311-win_amd64.whl
問題原因和解決思路參考:
https://q.cnblogs.com/q/142229/
dll缺失是關(guān)鍵問題:
這類情況直接whl安裝,需要根據(jù)python版本選擇whl,比如:python3.11,選文件名包含cp311。

二進(jìn)制安裝方式參考:
http://c.biancheng.net/pygame/installer.html

安裝前置事項(xiàng),重裝python(這步并非解決問題的關(guān)鍵,只是將前述操作做記錄)

  1. 控制面板內(nèi)與python相關(guān)程序都卸載——?jiǎng)傞_始只卸載了python程序,后來發(fā)現(xiàn)還有一個(gè)python launcher的程序未卸載。

  1. 選自定義安裝方式,安裝路徑:C:\Python311,將python放C盤根目錄。(多數(shù)軟件使用問題的通用解決思路)文章來源地址http://www.zghlxwxcb.cn/news/detail-407169.html

自定義安裝,參考: https://opentechschool.github.io/python-beginners/en/getting_started.html#what-is-python-exactly
Note
On Windows, you’ll want to add Python to your PATH, so it can be found by other programs. With Python 3.5 or later, there should be and option to do this in the installer. Otherwise, you can navigate to your installation directory (C:\Python34\), open the Tools, then Scripts folder, and run the win_add2path.py file by double clicking on it.

到了這里,關(guān)于[Python]pip install pygame安裝報(bào)錯(cuò)解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • python pip install 總是報(bào)錯(cuò)及解決辦法

    python pip install 總是報(bào)錯(cuò)及解決辦法

    情況一 pip 正常安裝完成,但是在安裝庫的時(shí)候出現(xiàn)如下界面 ?運(yùn)行以下命令來升級(jí)pip 情況二 ?出現(xiàn)這種情況的原因:電腦里面同時(shí)存在著兩個(gè)版本,python2和python3,安裝的庫在下載的時(shí)候找不到對(duì)應(yīng)的版本 解決方法: 指定版本號(hào)即可 python -3 -m pip install 安裝的庫 python -3 -

    2024年02月14日
    瀏覽(24)
  • Python pip install 安裝包報(bào)錯(cuò)ERROR: Could not find a version that satisfies the requirement XXX解決方法

    Python pip install 安裝包報(bào)錯(cuò)ERROR: Could not find a version that satisfies the requirement XXX解決方法

    使用 pip 安裝 python 包時(shí),經(jīng)常會(huì)出現(xiàn)如下錯(cuò)誤: 本次在用pip命令(pip install pdf2word)安裝pdf2docx包的時(shí)候出錯(cuò) 因?yàn)楹髞戆惭b好了,所以故意安裝一個(gè)錯(cuò)誤的pdf2word,來整個(gè)圖 可能是國內(nèi)網(wǎng)絡(luò)不穩(wěn)定,直接導(dǎo)致報(bào)錯(cuò),而不是環(huán)境沖突。報(bào)錯(cuò)信息看起來容易把人誤導(dǎo)到解決包環(huán)境

    2024年01月18日
    瀏覽(107)
  • python pip install 安裝報(bào)錯(cuò):Requirement already satisfied:……

    python pip install 安裝報(bào)錯(cuò):Requirement already satisfied:……

    在Python中使用 pip 安裝包時(shí),可能會(huì)遇到錯(cuò)誤信息 “Requirement already satisfied”,這通常是因?yàn)橄到y(tǒng)中存在多個(gè)Python環(huán)境,導(dǎo)致控制臺(tái)無法確定要使用哪個(gè)Python環(huán)境,因此顯示已滿足要求的錯(cuò)誤。 問題原因 這種情況發(fā)生的原因是因?yàn)镻ython環(huán)境的多樣性。在計(jì)算機(jī)上安裝了多個(gè)

    2024年02月08日
    瀏覽(95)
  • pip install安裝CPM-Bee出現(xiàn)ModuleNotFoundError: No module named ‘torch‘的解決方案

    pip install安裝CPM-Bee出現(xiàn)ModuleNotFoundError: No module named ‘torch‘的解決方案

    ??大家好,我是愛編程的喵喵。雙985碩士畢業(yè),現(xiàn)擔(dān)任全棧工程師一職,熱衷于將數(shù)據(jù)思維應(yīng)用到工作與生活中。從事機(jī)器學(xué)習(xí)以及相關(guān)的前后端開發(fā)工作。曾在阿里云、科大訊飛、CCF等比賽獲得多次Top名次?,F(xiàn)為CSDN博客專家、人工智能領(lǐng)域優(yōu)質(zhì)創(chuàng)作者。喜歡通過博客創(chuàng)作

    2024年02月10日
    瀏覽(96)
  • 安裝npm install XXXX報(bào)錯(cuò)-4048,解決方案

    安裝npm install XXXX報(bào)錯(cuò)-4048,解決方案

    安裝 newman 打開 cmd 輸入: npm install -g newman 校驗(yàn):安裝完成后,輸入 newman -v 命令查看版本信息,檢測是否安裝成功 報(bào)錯(cuò)信息 npm ERR! Error: EPERM: operation not permitted, mkdir \\\'E:node node_global node_modules\\\' 這個(gè)文件夾不允許操作 解決方案: 找到該文件夾,修改權(quán)限即可解決 ?

    2024年02月16日
    瀏覽(38)
  • pip install 報(bào)錯(cuò): Microsoft Visual C++ 14.0 is required (10M安裝包,5分鐘解決)

    pip install 報(bào)錯(cuò): Microsoft Visual C++ 14.0 is required (10M安裝包,5分鐘解決)

    目錄 問題現(xiàn)象 ?解決辦法: 1.下載文件包 2. 安裝 3. 安裝好之后 pip install 報(bào)錯(cuò): Microsoft Visual C++ 14.0 is required 系統(tǒng): win10 我們?cè)趐ip安裝的時(shí)候有時(shí)候會(huì)報(bào)錯(cuò), 如下: 這是缺少C++庫導(dǎo)致的,解決辦法也很簡單 網(wǎng)上一堆教程,讓你下載幾個(gè)G的?Visual Studio, 又慢又麻煩,而且還

    2024年02月07日
    瀏覽(27)
  • Python + selenium 安裝問題,pip install selenium失敗及解決方法

    Python + selenium 安裝問題,pip install selenium失敗及解決方法

    ? ? ? ? ? 最近想要是使用Python 訪問下瀏覽器,網(wǎng)上關(guān)于這些東西都很多,Python 安裝和 selenium 的下載就不贅述,這里簡單總結(jié)一下第一次安裝Python + selenium中遇到的問題。 ? ? Python傻瓜式安裝,但注意 安裝目錄選擇 , 環(huán)境變量的添加 。 ? ??selenium.exe下載對(duì)應(yīng)瀏覽器對(duì)應(yīng)

    2024年02月11日
    瀏覽(19)
  • pip安裝ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device解決方案

    pip安裝ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device解決方案

    ??大家好,我是愛編程的喵喵。雙985碩士畢業(yè),現(xiàn)擔(dān)任全棧工程師一職,熱衷于將數(shù)據(jù)思維應(yīng)用到工作與生活中。從事機(jī)器學(xué)習(xí)以及相關(guān)的前后端開發(fā)工作。曾在阿里云、科大訊飛、CCF等比賽獲得多次Top名次?,F(xiàn)為CSDN博客專家、人工智能領(lǐng)域優(yōu)質(zhì)創(chuàng)作者。 ??本文主要介

    2024年02月16日
    瀏覽(26)
  • install_github安裝包報(bào)錯(cuò)說download falied的解決方案

    install_github安裝包報(bào)錯(cuò)說download falied的解決方案

    最近用devtools::install_github一個(gè)R包,死活都下載不下來,報(bào)錯(cuò)說download falied! 試了各種方法都不行,最后終于找到解決方案了,特此記錄下! 將上面報(bào)錯(cuò)的鏈接復(fù)制到瀏覽器,會(huì)發(fā)現(xiàn)是可以下載這個(gè)包的,所以直接把這個(gè)包下載到本地來安裝就可以了,前提是要看看它依賴的

    2024年02月10日
    瀏覽(31)
  • pycharm 無法加載pip3安裝包報(bào)錯(cuò):python packing tools not found. install packing tools

    win+R輸入cmd,然后輸入代碼,回車,出現(xiàn)install sucessfully表示成功 Python 2.7.9 + 或 Python 3.4+ 以上版本都自帶 pip 工具。 查看是否已經(jīng)安裝 pip 可以使用以下命令: 下載安裝包使用以下命令: 例如我們安裝 numpy 包: 我們也可以輕易地通過以下的命令來移除軟件包: 例如我們移除

    2024年02月05日
    瀏覽(28)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包