Subprocess exited with error при установке pygame

Environment: You can get some of this info from the text that pops up in the console when you run a pygame program. Operating system (e.g. Windows, Linux(Debian), Linux(Ubuntu), Mac): Windows Pytho...

@Matiiss

This is not exactly a bug, it’s that there are no release wheels yet for 3.11, use pip install pygame --pre (--pre stands for pre release), it will install pygame 2.1.3.dev8 and you can use that, 2.1.3 is coming soon but I can’t tell for sure when.

mariolacko, MaxWolf-01, wang551, rammfire, Zageron, aza547, johnp808, jeck3763, mikiweys, hit-the-dust, and 27 more reacted with thumbs up emoji
AntonioGms2007, ghanteyyy, freebird-2, Heebeaux, Be3y4uu-K0T, mikiweys, hit-the-dust, RodionYalyna, theRealProHacker, NikBandi, and 3 more reacted with laugh emoji
unowiz reacted with hooray emoji
marurunk, Px228, puisigblk, LeStefan04, bikrampun, Assentencia, Kocmocy-Da, and des5771 reacted with heart emoji

@ghost

Was able to duplicate this issue with:

  • Python 3.11.0
  • macOS Monterey 12.6
  • Pygame 2.1.2
    I used pip3 install pygame and got a huge error message, as shown in the OP.

I do have a question, if there is no wheel made for Python3 3.11.0, is installing pygame 2.1.3.dev8 the only option? Is this release stable?

@Matiiss

@arknaut Well, that’s the latest version of pygame that has wheels for Python 3.11 so it would be the most stable for that version of Python. Also, yeah, it should be stable enough on its own anyways, but again, it’s kind of temporary, I can’t tell for sure (or at all) but soon wheels for 2.1.3 should be released and they will be made for 3.11 too.

@ghost

@Matiiss — Okay thanks! (just clarifying) pygame 2.1.3.dev8 has been released as a temporary version of pygame so that python 3.11.0 users can continue using pygame.

@Matiiss

Uh, no, it’s more like 2.1.3.dev8 (it’s technically a pre-release btw) happens to have wheels for Python 3.11, it’s not specifically temporarily released for 3.11 because really 2.1.3 is kind of released already, it just doesn’t have wheels yet. But don’t take my word for it, however, I’m pretty sure it’s not something specifically done.

@ghost

@oddbookworm

2.1.3dev8 is the only version with 3.11 wheels prebuilt. If you really want to use 2.1.2, you’ll have to build the wheels yourself. But 2.1.3dev8 is essentially the full 2.1.3 release, but in pre-release form. It wasn’t specifically released to target 3.11, but since 3.11 was coming out soon, compatibility with 3.11 was added to dev8 by starbuck5 and ankith

@fladd

Are there any updates on this? Or an ETA for the new Pygame version?

@MyreMylar

@rammfire

Hello everyone. I observe the same problem on Armbian

pip install pygame
Defaulting to user installation because normal site-packages is not writeable
Collecting pygame
  Downloading pygame-2.1.2.tar.gz (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 3.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      
      
      WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
      Using UNIX configuration...
      
      /bin/sh: 1: sdl2-config: not found
      /bin/sh: 1: sdl2-config: not found
      /bin/sh: 1: sdl2-config: not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/setup.py", line 359, in <module>
          buildconfig.config.main(AUTO_CONFIG)
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/buildconfig/config.py", line 225, in main
          deps = CFG.main(**kwds)
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/buildconfig/config_unix.py", line 188, in main
          DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/buildconfig/config_unix.py", line 39, in __init__
          self.ver = config[0].strip()
      IndexError: list index out of range
      
      Hunting dependencies...
      
      ---
      For help with compilation see:
          https://www.pygame.org/wiki/Compilation
      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.

@oddbookworm

@rammfire if you read a few messages above, Matiiss gave the solution

@fladd

@rammfire if you read a few messages above, Matiiss gave the solution

Unfortunately this is not really a solution for other packages that depend on Pygame.

For instance, I am about to release a new version of Expyriment, which depends on Pygame, and I am currently mainly holding it back due to this issue. Would be great to have some idea on when proper Python 3.11 support is planned (roughly, like within the next few days, or will it still be months?).

@oddbookworm

@fladd The full release of 2.1.3 is almost out. I’m hoping it’ll be within a week or two at most, but that’s really up to the discretion of the lead maintainer right now

@freedom-penguin

Cant wait for the full release ! 😄

PeterJCLaw

added a commit
to PeterJCLaw/python-osc
that referenced
this issue

Nov 17, 2022

@PeterJCLaw

This was referenced

Nov 17, 2022

@liudonghua123

Though pip install pygame --pre works on python 3.11 on my windows 11. I would like to use the release version of pygame. 😄

Looking forward to pygame-2.1.3.

C:UsersLiu.D.H>pip install pygame --pre
Collecting pygame
  Downloading pygame-2.1.3.dev8-cp311-cp311-win_amd64.whl (10.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.6/10.6 MB 4.8 MB/s eta 0:00:00
Installing collected packages: pygame
Successfully installed pygame-2.1.3.dev8

C:UsersLiu.D.H>

@NikBandi

@AokiAhishatsu

C:UsersLiu.D.H>pip install pygame —pre

Can confirm this works. (Tested on Win10)

@Ivoz

I would advocate for a point release that basically doesn’t change anything from the previous, but simply provides wheels for the new python version. A lot of beginners will get caught up on this while a new patch release is prepared. e.g., 2.1.3 simply ships additional 3.11 wheels, 2.1.4 gets moved to new patch release.

@oddbookworm

I would advocate for a point release that basically doesn’t change anything from the previous, but simply provides wheels for the new python version. A lot of beginners will get caught up on this while a new patch release is prepared. e.g., 2.1.3 simply ships additional 3.11 wheels, 2.1.4 gets moved to new patch release.

To the best of my knowledge, 2.1.3 is ready for release. Just waiting on the head maintainer to actually release it.

@fladd

@fladd The full release of 2.1.3 is almost out. I’m hoping it’ll be within a week or two at most, but that’s really up to the discretion of the lead maintainer right now

Since it has been over a month now: Is there any news regarding the release?

@oddbookworm

Since it has been over a month now: Is there any news regarding the release?

To the best of my knowledge, the lead maintainer has not said anything to anyone in that time. Nobody else has the ability to release 2.1.3, so unfortunately we’re stuck waiting

@oddbookworm

@illume Python 3.11 has been out for a month and a half (and pygame’s main branch has been on 2.1.4dev1 for just as long). More and more people are starting to move to 3.11 and the fact that the only version of pygame with support for 3.11 requires knowledge of how to install a prerelease might detract users from continuing to use pygame. Is there something specific holding back the release? There are also other projects that are waiting for pygame 2.1.3 to fully release so they can update their dependencies.

@ea7kir

I’ve tried and tried, but can’t even instal the pre-release.
RPi 4B, Bullseye (64-bit), Python3.11.

pi@rxtouchlite:~/pgtest $ pip install pygame —pre
Collecting pygame
Downloading pygame-2.1.3.dev8.tar.gz (12.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.1/12.1 MB 2.8 MB/s eta 0:00:00
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [33 lines of output]

  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using UNIX configuration...
  
  /bin/sh: 1: sdl2-config: not found
  /bin/sh: 1: sdl2-config: not found
  /bin/sh: 1: sdl2-config: not found
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/setup.py", line 399, in <module>
      buildconfig.config.main(AUTO_CONFIG)
    File "/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/buildconfig/config.py", line 231, in main
      deps = CFG.main(**kwds, auto_config=auto)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/buildconfig/config_unix.py", line 189, in main
      DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/buildconfig/config_unix.py", line 39, in __init__
      self.ver = config[0].strip()
                 ~~~~~~^^^
  IndexError: list index out of range
  
  Hunting dependencies...
  
  ---
  For help with compilation see:
      https://www.pygame.org/wiki/Compilation
  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.

@MyreMylar

Are you sure you are using the pip from python 3.11 there? Pis come with
multiple python versions. I thought you had to use pip3 on there

On Sat, 17 Dec 2022, 11:38 Michael Naylor, ***@***.***> wrote:
I’ve tried and tried, but can’t even instal the pre-release.
RPi 4B, Bullseye (64-bit), Python3.11.

***@***.***:~/pgtest $ pip install pygame —pre
Collecting pygame
Downloading pygame-2.1.3.dev8.tar.gz (12.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.1/12.1 MB 2.8 MB/s eta 0:00:00
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [33 lines of output]

WARNING, No «Setup» File Exists, Running «buildconfig/config.py»

Using UNIX configuration…

/bin/sh: 1: sdl2-config: not found

/bin/sh: 1: sdl2-config: not found

/bin/sh: 1: sdl2-config: not found

Traceback (most recent call last):

File «<string>», line 2, in <module>

File «<pip-setuptools-caller>», line 34, in <module>

File «/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/setup.py», line 399, in <module>

buildconfig.config.main(AUTO_CONFIG)

File «/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/buildconfig/config.py», line 231, in main

deps = CFG.main(**kwds, auto_config=auto)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File «/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/buildconfig/config_unix.py», line 189, in main

DependencyProg(‘SDL’, ‘SDL_CONFIG’, ‘sdl2-config’, ‘2.0’, [‘sdl’]),

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File «/tmp/pip-install-9_sp3ju8/pygame_06121d1e121e4eafb99504b0ad01a83b/buildconfig/config_unix.py», line 39, in __init__

self.ver = config[0].strip()

~~~~~~^^^

IndexError: list index out of range

Hunting dependencies…

For help with compilation see:

https://www.pygame.org/wiki/Compilation

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.


Reply to this email directly, view it on GitHub
<#3522 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGDGGRVNWTT24EY5AYKHATWNWQ4BANCNFSM6AAAAAARQJB5DY>
.
You are receiving this because you commented.Message ID:
***@***.***>

@ea7kir

Are you sure you are using the pip from python 3.11 there? Pis come with multiple python versions. I thought you had to use pip3 on there

I think so. Both ‘pip’ and ‘pip3’ report version 22.3.1 from the same ‘penv global 3.11.0’.

@MyreMylar

Ah, I suspect it is because the pi is looking on the piwheels repository instead of PyPI and it won’t find any 3.11 wheels on piwheels because piwheels only builds wheels for a maximum of python 3.9.

If your pip is configured to use piwheels, but you want to use PyPI instead, you can remove or comment out the extra-index-url configuration in /etc/pip.conf

Otherwise you will have to learn to build pygame from source if you want to use 3.11 on a raspberry PI.

Trinkle23897

added a commit
to Trinkle23897/envpool
that referenced
this issue

Dec 28, 2022

@Trinkle23897

@dlwaters

Had same error. Used temporary fix.

Please, please, please post this solution on the homepage of Pygame!

I’m an experienced coder but new to python and spent several hours thinking I had done something wrong.

@oddbookworm

Unfortunately, the only person with access to the pygame.org website is the same person that can fix this whole mess in the first place. But, they’ve been unresponsive so far.

@dlwaters

But, they’ve been unresponsive so far.

Bummer. First installs always seem to go sideways. :-(

@khalzal

Hello, everybody.

I followed what was written here, but when I entered the «import pygame» command, I got an error (Windows can not find import).

Who can help? Where is my mistake? Which direction in should I look for a solution to the problem?

2023-02-03 161516
2023-02-03 161438

@oddbookworm

Did you try to run import pygame directly in command prompt? You need to be in an actual Python shell to do that (which you can get to just by typing python

@khalzal

Did you try to run import pygame directly in command prompt? You need to be in an actual Python shell to do that (which you can get to just by typing python

Thank you! This little detail helped a lot.

@tayler6000

I’m also trying to install from source at the moment and I’m getting the following error:

urllib.error.HTTPError: HTTP Error 503: Egress is over the account limit.

The pre-release wheel does work for me though.

When trying to download pygame i get this error.

C:UsersDawid>pip install pygame

WARNING: Ignoring invalid distribution -ip (c:msys64mingw64libpython3.9site-packages)

WARNING: Ignoring invalid distribution -ip (c:msys64mingw64libpython3.9site-packages)

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

╰─> [74 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:UsersDawidAppDataLocalTemppip-install-5f8uuusapygame_7394d620aeb345fba021ec291007af65setup.py», line 359, in <module>

buildconfig.config.main(AUTO_CONFIG)

File «C:UsersDawidAppDataLocalTemppip-install-5f8uuusapygame_7394d620aeb345fba021ec291007af65buildconfigconfig.py», line 225, in main

deps = CFG.main(**kwds)

File «C:UsersDawidAppDataLocalTemppip-install-5f8uuusapygame_7394d620aeb345fba021ec291007af65buildconfigconfig_win.py», line 511, in main

return setup_prebuilt_sdl2(prebuilt_dir)

File «C:UsersDawidAppDataLocalTemppip-install-5f8uuusapygame_7394d620aeb345fba021ec291007af65buildconfigconfig_win.py», line 471, in setup_prebuilt_sdl2

DEPS.configure()

File «C:UsersDawidAppDataLocalTemppip-install-5f8uuusapygame_7394d620aeb345fba021ec291007af65buildconfigconfig_win.py», line 336, in configure

from . import vstools

File «C:UsersDawidAppDataLocalTemppip-install-5f8uuusapygame_7394d620aeb345fba021ec291007af65buildconfigvstools.py», line 11, in <module>

compiler.initialize()

File «C:msys64mingw64libpython3.9site-packagessetuptools_distutilsmsvccompiler.py», line 259, in initialize

self.__paths = self.get_msvc_paths(«path»)

File «C:msys64mingw64libpython3.9site-packagessetuptools_distutilsmsvccompiler.py», line 602, in get_msvc_paths

r»Win32 (%s)Directories» % (self.__root, platform))

AttributeError: ‘MSVCCompiler’ object has no attribute ‘_MSVCCompiler__root’

Making dir :prebuilt_downloads:

Downloading… https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip ed561079ec622b0bab5a9e02976f5d540b0622da

Unzipping :prebuilt_downloadsSDL2-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_downloadsSDL2_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_downloadsSDL2_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_downloadsSDL2_mixer-devel-2.0.4-VC.zip:

Downloading… https://www.pygame.org/ftp/jpegsr9d.zip ed10aa2b5a0fcfe74f8a6f7611aeb346b06a1f99

Unzipping :prebuilt_downloadsjpegsr9d.zip:

Downloading… https://pygame.org/ftp/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed

Unzipping :prebuilt_downloadsprebuilt-x64-pygame-1.9.2-20150922.zip:

copying into .prebuilt-x64

Path for SDL: prebuilt-x64SDL2-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-x64SDL2_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-x64SDL2_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-x64SDL2_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: Ignoring invalid distribution -ip (c:msys64mingw64libpython3.9site-packages)

WARNING: Ignoring invalid distribution -ip (c:msys64mingw64libpython3.9site-packages)

I’ve been looking for a solution for quite a while now but haven’t found anything. Any help would be appreciated

При попытке установить pygame выдаёт ошибку через cmd или пайчарм
Использую Винду 10 и Пайтон 3.11

C:WindowsSystem32>py -m pip install -U pygame —user
Collecting pygame
Using cached pygame-2.1.2.tar.gz (10.1 MB)
Preparing metadata (setup.py) … done
Building wheels for collected packages: pygame
Building wheel for pygame (setup.py) … error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
tmpft0ha9oc.cpp
tmp7gwudn6z.cpp
imageext.c
c:program filespython311includepyconfig.h(207): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: basetsd.h: No such file or directory,


For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html

error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe’ failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pygame
Running setup.py clean for pygame
Failed to build pygame
Installing collected packages: pygame
Running setup.py install for pygame … error
error: subprocess-exited-with-error

× Running setup.py install for pygame did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
C:UsersusvetAppDataRoamingPythonPython311si te-packagessetuptoolscommandinstall.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
tmpnc2piedr.cpp
tmpmby8_7jy.cpp
imageext.c
c:program filespython311includepyconfig.h(207): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: basetsd.h: No such file or directory,


For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html

error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe’ failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pygame

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

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
  ╰─> [32 lines of output]
      
      
      WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
      Using UNIX configuration...
      
      /bin/sh: pkg-config: not found
      /bin/sh: pkg-config: not found
      /bin/sh: pkg-config: not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-4ux7mnm0/pygame_105c4eeb0de54659b8330f75d435adf2/setup.py", line 359, in <module>
          buildconfig.config.main(AUTO_CONFIG)
        File "/tmp/pip-install-4ux7mnm0/pygame_105c4eeb0de54659b8330f75d435adf2/buildconfig/config.py", line 225, in main
          deps = CFG.main(**kwds)
        File "/tmp/pip-install-4ux7mnm0/pygame_105c4eeb0de54659b8330f75d435adf2/buildconfig/config_unix.py", line 208, in main
          DEPS.append(find_freetype())
        File "/tmp/pip-install-4ux7mnm0/pygame_105c4eeb0de54659b8330f75d435adf2/buildconfig/config_unix.py", line 172, in find_freetype
          pkg_config = DependencyProg(
        File "/tmp/pip-install-4ux7mnm0/pygame_105c4eeb0de54659b8330f75d435adf2/buildconfig/config_unix.py", line 39, in __init__
          self.ver = config[0].strip()
      IndexError: list index out of range
      Hunting dependencies...
      ---
      For help with compilation see:
          https://www.pygame.org/wiki/Compilation
      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.

Hello everyone!

I try to install game library for Python 3 (via pip) PyGame. After downloading package, i get message below:

pip install pygame
Defaulting to user installation because normal site-packages is not writeable
Collecting pygame
  Downloading pygame-2.1.2.tar.gz (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 3.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
   exit code: 1
  ╰─> [30 lines of output]
      
      
      WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
      Using UNIX configuration...
      
      /bin/sh: 1: sdl2-config: not found
      /bin/sh: 1: sdl2-config: not found
      /bin/sh: 1: sdl2-config: not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/setup.py", line 359, in <module>
          buildconfig.config.main(AUTO_CONFIG)
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/buildconfig/config.py", line 225, in main
          deps = CFG.main(**kwds)
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/buildconfig/config_unix.py", line 188, in main
          DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
        File "/tmp/pip-install-m1yp62ur/pygame_44d4c02831ed4c49940d26d640b55b6a/buildconfig/config_unix.py", line 39, in __init__
          self.ver = config[0].strip()
      IndexError: list index out of range
      
      Hunting dependencies...
      
      ---
      For help with compilation see:
          https://www.pygame.org/wiki/Compilation
      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.

Я уже пробовал много советов и все еще получаю эту ошибку при установке pygame, у меня есть python 3.11 и я пытался переключиться на 3.9 с тем же результатом

Команда установки: pip3 install pygame

Сбор pygame Использование кэшированного pygame-2.1.2.tar.gz (10,1 МБ) Подготовка метаданных (setup.py)… ошибка error: subprocess-exited-with-error

× python setup.py egg_info не запустился успешно. │ код выхода: 1 ╰─> [32 строки вывода]

  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using Darwin configuration...
  
  /bin/sh: sdl2-config: command not found
  /bin/sh: sdl2-config: command not found
  /bin/sh: sdl2-config: command not found
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/j0/jkd60bqs5blcvy0t1_4r47sw0000gn/T/pip-install-ho52d8jb/pygame/setup.py", line 359, in <module>
      buildconfig.config.main(AUTO_CONFIG)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/j0/jkd60bqs5blcvy0t1_4r47sw0000gn/T/pip-install-ho52d8jb/pygame/buildconfig/config.py", line 225, in main
      deps = CFG.main(**kwds)
             ^^^^^^^^^^^^^^^^
    File "/private/var/folders/j0/jkd60bqs5blcvy0t1_4r47sw0000gn/T/pip-install-ho52d8jb/pygame/buildconfig/config_darwin.py", line 132, in main
      [DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/j0/jkd60bqs5blcvy0t1_4r47sw0000gn/T/pip-install-ho52d8jb/pygame/buildconfig/config_unix.py", line 39, in __init__
      self.ver = config[0].strip()
                 ~~~~~~^^^
  IndexError: list index out of range
  
  ---
  For help with compilation see:
      https://www.pygame.org/wiki/MacCompile
  To contribute to pygame development see:
      https://www.pygame.org/contribute.html
  ---
  
  [end of output]

Примечание: эта ошибка возникает из-за подпроцесса и, скорее всего, не связана с pip. ошибка: сбой генерации метаданных

× Обнаружена ошибка при создании метаданных пакета. ╰─> пигейм

Примечание: это проблема с упомянутым выше пакетом, а не с pip. подсказка: подробности см. выше.

Содержание

  1. Subprocess exited with error pip
  2. Check if your Python version is supported by the package #
  3. Create a virtual environment #
  4. Try running pip install in verbose mode #
  5. Conclusion #
  6. Pip 22.1 (only) fails when included in pyproject.toml #11120
  7. Comments
  8. Description
  9. Expected behavior
  10. pip version
  11. Python version
  12. How to Reproduce
  13. Output
  14. Code of Conduct
  15. Can’t install #433
  16. Comments
  17. I am trying to install the package but pip keeps failing. The error I get is this:
  18. Ошибка подпроцесса при установке Kivy на Windows. Что делать?

Subprocess exited with error pip

The —use-deprecated option allows us to use the old resolver behavior when installing modules.

If the suggestions didn’t help, read toward the end of your error message.

It might contain information such as: «RuntimeError: Cannot install on Python version 3.11.0; only versions >=3.7, pip install the package from the error message before installing the other package.

Another common cause of the error is misspelling the name of the package and trying to install some broken, obsolete module by mistake.

Check if your Python version is supported by the package #

The error «note: This error originates from a subprocess, and is likely not a problem with pip» is sometimes caused when the package you are trying to install doesn’t have available wheels for your version of Python.

You can check your Python version with the python —version command.

You can check if a package has wheels available for a specific Python version in the Download files section of the package’s pypi page.

If the .whl files are not available for your version of Python, you can download an older version.

The —pre option makes it so pip includes pre-release and development versions of the package. By default pip only finds stable versions.

If that didn’t work, you can download a specific Python version that is supported by the package if the package doesn’t support the latest Python version.

Different versions are available in the «Looking for a specific release» table.

Make sure to tick the following options if you get prompted:

  • Install launcher for all users (recommended)
  • Add Python to PATH (this adds Python to your PATH environment variable)

If that didn’t help and you don’t already have a virtual environment, try creating one.

Create a virtual environment #

To solve the «note: This error originates from a subprocess, and is likely not a problem with pip» error:

  1. Create a virtual environment.
  2. Activate the virtual environment.
  3. Run the pip install command with the virtual environment active.

Make sure to use the correct command to activate your virtual environment depending on your operating system and your shell.

Your virtual environment will use the version of Python that was used to create it.

Try running pip install in verbose mode #

If none of the suggestions helped, try running the pip install command in verbose mode.

The -v option stands for verbose mode and can be used up to 3 times.

When the pip install command is run in verbose mode, the command shows more output and how the error occurred.

Conclusion #

To solve the error «note: This error originates from a subprocess, and is likely not a problem with pip»:

  1. Upgrade your versions of pip , setuptools and wheel .
  2. Make sure you haven’t got any missing dependencies.
  3. Make sure your Python version is supported by the package.

Источник

Pip 22.1 (only) fails when included in pyproject.toml #11120

Description

Starting with pip 22.1, including «pip» in the pyproject.toml [build-system] requires fails.

Verified that this succeeds with pip 22.0.4

This error message repeatedly states that this is likely not a problem with pip. but it is the change from pip 22.0.4 to 22.1 that breaks it.

Expected behavior

I expect pip 22.1 to behave the same as pip 22.0.4; namely, that the installation succeeds.

Output when using pip 22.0.4:

pip version

Python version

Windows 11 (21H2)

How to Reproduce

  1. Create a virtual environment and activate it
  2. Install pip 22.1
  3. Create a python package with a pyproject.toml containing:
  1. Install this python package from the local directory with python -m pip install
  2. Observe the error

Output

Code of Conduct

The text was updated successfully, but these errors were encountered:

You shouldn’t have pip in build-requires in the first place — why do you think you need it there?

The reason it’s failing is a somewhat complex combination of the fact that pip is already in the build environment to install everything else, pip can’t upgrade itself on Windows unless it’s invoked via python -m pip , and when setting up the build environment it looks like we invoke pip rather than python -m pip . It’s probably fixable, but messy to do so.

I don’t think this is worth fixing because you shouldn’t have pip in build-requires in the first place.

This might be something that we could prevent — I don’t have a Windows machine to be able to see why/what is happening. What’s happening here is that the environment is basically triggering the logic meant to protect users from a broken pip installation on Windows (see #1299).

It’s unclear to me why that’s happening, but we might have a spot where code needs to change from pip . to sys.executable -m pip . in the codebase — or some edge case that needs to be accounted for?

If someone is able to reproduce this, please plug a debugger into pip and share the values in the locals() and sys.argv[0] at:

modifying_pip and WINDOWS and os . path . basename ( sys . argv [ 0 ]) in pip_names

This error message repeatedly states that this is likely not a problem with pip.

Yea, this happening in a build step, where the typical failure is things like the package not having the appropriate build-time dependencies installed. The use of the word likely points toward that. 🙂

@pradyunsg this is indeed probably the solution, although we may be invoking the build environment’s pip at this point, so sys.executable might be the wrong thing to use.

As I say, it’s possible, but tricky, and I’d like to know why the OP wants to include pip in build-system.requires before we «fix» this.

Bah, you’re right — I missed that nuance. 🙂

You shouldn’t have pip in build-requires in the first place — why do you think you need it there?

. I had no reason to think it didn’t need to be there? It needs setuptools and wheel to be there. Why do those need to be there and not pip? The documentation states that build-system.requires is a list of requirement specifiers for build-time dependencies of a package. It seems like pip is a build-time dependency of my package. I don’t see how it can pip install if the user doesn’t even have pip.

If no pyproject.toml should ever have pip in build-system.requires , then the documentation does not make this clear.

If no pyproject.toml should ever have pip in build-system.requires, then the documentation does not make this clear.

build-system.requires is intended to be «the things you need in the environment order to build the project». It’s the front end’s responsibility to install those items into the environment and to call the build_wheel hook of the backend in that environment. That build frontend might be pip or it might be something else. But it doesn’t need to be in the environment because it orchestrates the creation and use of that environment.

I don’t think it ever occurred to me that people might think pip needed to be added into the build environment. If you were building a wheel using build would you expect to put build in there? How can you know what frontend the user is invoking? But if you have a suggestion for improving the documentation, that would be great! I guess the first question is which documentation you’d want to improve — this stuff is generally covered in packaging.python.org, not in pip’s documentation, so a PR there might be the best approach.

This is covered in pip’s documentation, as part of https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-time-dependencies, which might be the sentence that is the source of the confusion here.

Is this still happening in 22.1.1?

. I had no reason to think it didn’t need to be there? It needs setuptools and wheel to be there

Why does wheel need to be there? Setuptools lists it as a dependency for building wheels and is automatically installed when necessary.

It used to not do that, in earlier versions of setuptools.

Источник

Can’t install #433

I am trying to install the package but pip keeps failing. The error I get is this:

Collecting PyBluez
Using cached PyBluez-0.23.tar.gz (97 kB)
Preparing metadata (setup.py) . error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in PyBluez setup command: use_2to3 is invalid.
[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.

The text was updated successfully, but these errors were encountered:

— a caller that pip uses to run setup.py # # — It imports setuptools before invoking setup.py, to enable projects that directly # import from `distutils.core` to work with newer packaging standards. # — It provides a clear error message when setuptools is not installed. # — It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so # setuptools doesn’»‘»‘t think the script is `-c`. This avoids the following warning: # manifest_maker: standard file ‘»‘»‘-c’»‘»‘ not found». # — It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize try: import setuptools except ImportError as error: print( «ERROR: Can not execute `setup.py` since setuptools is not available in » «the build environment.», file=sys.stderr, ) sys.exit(1) __file__ = %r sys.argv[0] = __file__ if os.path.exists(__file__): filename = __file__ with tokenize.open(__file__) as f: setup_py_code = f.read() else: filename = «» setup_py_code = «from setuptools import setup; setup()» exec(compile(setup_py_code, filename, «exec»)) ‘»‘»»»‘»»»‘»‘ % (‘»‘»‘/tmp/pip-install-68qwtmvz/pybluez_c1c9b215cbe7493a9f160507e1e4e9c2/setup.py’»‘»‘,), «

«, «exec»))’ egg_info —egg-base /tmp/pip-pip-egg-info-ew_2egyz cwd: /tmp/pip-install-68qwtmvz/pybluez_c1c9b215cbe7493a9f160507e1e4e9c2/ Preparing metadata (setup.py) . error 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. «>

Related issues (did not check them for solutions yet):
#413 #424 #431

This was fixed in #431 — Solution for now, until a new release is pushed to pypi is:

Источник

Ошибка подпроцесса при установке Kivy на Windows. Что делать?

Я пытался установить Kivy через pip по инструкции с официального сайта, однако, при попытке установки консоль выдаёт следующую ошибку:

Если это важно, у меня стоит python 3.10.

Как решить данную проблему?

  • Вопрос задан 06 февр. 2022
  • 3479 просмотров

Потихонечку откатываемся на python 3.8

Также, если есть желание, перед установкой любой библиотеки, желательно почитать офф. инструкцию по установке:
Kivy 2.0.0 officially supports Python versions 3.6 — 3.9. — второе предложение в инструкции!

Потихонечку откатываемся на python 3.8

А если серьёзно, у вас он работает с 3.9?

3.7, 3.8, 3.9 — тут вообще без разницы, абсолютно.

Тем более, последние версии не опытным пользователям привозят только вагон и маленькую тележку проблем.

Если без разницы, тогда почему 3.8?

Какие проблемы привозит 3.9 в отличие от 3.8?

Как вариант, меньшее количество пакетов, доступных через pip install. Конечно, можно большинство пакетов в Python 3.9, 3.10. установить из исходников, но новички этим заниматься не будут!

Источник

Понравилась статья? Поделить с друзьями:
  • Subprocess dpkg deb control returned error exit status 2 cydia
  • Subnautica ошибки новичков
  • Submit error success перевод
  • Submit error success perfect world
  • Submission failed http error 422 roblox