Skip to content

pygame not installing, kindly help me #2693

@Krad95

Description

@Krad95

Microsoft Windows [Version 10.0.18363.418]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\Masoom Raza>pip install pygame --pre
Collecting pygame
Using cached pygame-2.6.1.tar.gz (14.8 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

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

  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using WINDOWS configuration...

  Traceback (most recent call last):
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 1321, in do_open
      h.request(req.get_method(), req.selector, req.data, headers,
      ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                encode_chunked=req.has_header('Transfer-encoding'))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\http\client.py", line 1338, in request
      self._send_request(method, url, body, headers, encode_chunked)
      ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\http\client.py", line 1384, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
      ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\http\client.py", line 1333, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
      ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\http\client.py", line 1093, in _send_output
      self.send(msg)
      ~~~~~~~~~^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\http\client.py", line 1037, in send
      self.connect()
      ~~~~~~~~~~~~^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\http\client.py", line 1479, in connect
      self.sock = self._context.wrap_socket(self.sock,
                  ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
                                            server_hostname=server_hostname)
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\ssl.py", line 455, in wrap_socket
      return self.sslsocket_class._create(
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
          sock=sock,
          ^^^^^^^^^^
      ...<5 lines>...
          session=session
          ^^^^^^^^^^^^^^^
      )
      ^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\ssl.py", line 1076, in _create
      self.do_handshake()
      ~~~~~~~~~~~~~~~~~^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\ssl.py", line 1372, in do_handshake
      self._sslobj.do_handshake()
      ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
      exec(compile('''
      ~~~~^^^^^^^^^^^^
      # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ...<32 lines>...
      exec(compile(setup_py_code, filename, "exec"))
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ''' % ('C:\\Users\\Masoom Raza\\AppData\\Local\\Temp\\pip-install-c96_lc8j\\pygame_6b1688596ca14008a7b45a08a1f4ceab\\setup.py',), "<pip-setuptools-caller>", "exec"))
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<pip-setuptools-caller>", line 35, in <module>
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\setup.py", line 432, in <module>
      buildconfig.config.main(AUTO_CONFIG)
      ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\buildconfig\config.py", line 234, in main
      deps = CFG.main(**kwds, auto_config=auto)
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\buildconfig\config_win.py", line 479, in main
      and download_win_prebuilt.ask(**download_kwargs):
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\buildconfig\download_win_prebuilt.py", line 265, in ask
      update(x86=x86, x64=x64)
      ~~~~~~^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\buildconfig\download_win_prebuilt.py", line 248, in update
      download_prebuilts(download_dir, x86=x86, x64=x64)
      ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\buildconfig\download_win_prebuilt.py", line 116, in download_prebuilts
      download_sha1_unzip(url, checksum, temp_dir, 1)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Temp\pip-install-c96_lc8j\pygame_6b1688596ca14008a7b45a08a1f4ceab\buildconfig\download_win_prebuilt.py", line 51, in download_sha1_unzip
      response = urllib.urlopen(request).read()
                 ~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 187, in urlopen
      return opener.open(url, data, timeout)
             ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 487, in open
      response = self._open(req, data)
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 504, in _open
      result = self._call_chain(self.handle_open, protocol, protocol +
                                '_open', req)
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 464, in _call_chain
      result = func(*args)
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 1369, in https_open
      return self.do_open(http.client.HTTPSConnection, req,
             ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                          context=self._context)
                          ^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Masoom Raza\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 1324, in do_open
      raise URLError(err)
  urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)>
  Making dir :prebuilt_downloads:
  Downloading... https://www.libsdl.org/release/SDL2-devel-2.28.4-VC.zip 25ef9d201ce3fd5f976c37dddedac36bd173975c

  ---
  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.

C:\Users\Masoom Raza>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions