مهدی چلواری
2 سال پیش توسط مهدی چلواری مطرح شد
2 پاسخ

ارور در نصب پای گیم

سلام من دستور نصب پای گیم رو زدم ولی این ارور رو داد لطفا کمک کن

C:\\Users\\mahdi>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 egginfo did not run successfully.  
│ exit code: 1  
╰─> \[91 lines of output\]
  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using WINDOWS configuration...

  Traceback (most recent call last):
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
      httplib_response = self._make_request(
                         ^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
      self._validate_conn(conn)
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
      conn.connect()
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 414, in connect
      self.sock = ssl_wrap_socket(
                  ^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
      ssl_sock = _ssl_wrap_socket_impl(
                 ^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
      return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 517, in wrap_socket
      return self.sslsocket_class._create(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1075, in _create
      self.do_handshake()
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1346, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:992)

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
      resp = conn.urlopen(
             ^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
      retries = retries.increment(
                ^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 592, in increment
      raise MaxRetryError(_pool, url, error or ResponseError(cause))
  urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.libsdl.org', port=443): Max retries exceeded with url: /release/SDL2-devel-2.0.18-VC.zip (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:992)')))

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\setup.py", line 359, in <module>
      buildconfig.config.main(AUTO_CONFIG)
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\buildconfig\config.py", line 225, in main
      deps = CFG.main(**kwds)
             ^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\buildconfig\config_win.py", line 497, in main
      and download_win_prebuilt.ask(**download_kwargs):
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\buildconfig\download_win_prebuilt.py", line 290, in ask
      update(x86=x86, x64=x64)
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\buildconfig\download_win_prebuilt.py", line 273, in update
      download_prebuilts(download_dir, x86=x86, x64=x64)
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\buildconfig\download_win_prebuilt.py", line 124, in download_prebuilts
      download_sha1_unzip(url, checksum, temp_dir, 1)
    File "C:\Users\mahdi\AppData\Local\Temp\pip-install-i71kqs0d\pygame_9e6755e8c299467182127cc59424c577\buildconfig\download_win_prebuilt.py", line 47, in download_sha1_unzip
      response = requests.get(url)
                 ^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 73, in get
      return request("get", url, params=params, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
      return session.request(method=method, url=url, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
      resp = self.send(prep, **send_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
      r = adapter.send(request, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\mahdi\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 563, in send
      raise SSLError(e, request=request)
  requests.exceptions.SSLError: HTTPSConnectionPool(host='www.libsdl.org', port=443): Max retries exceeded with url: /release/SDL2-devel-2.0.18-VC.zip (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:992)')))
  Making dir :prebuilt_downloads:
  Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip ed561079ec622b0bab5a9e02976f5d540b0622da

  ---
  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.  
╰─&gt; See above for output.

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

ثبت پرسش جدید
رایموند
تخصص : مختصص وردپرس - برنامه نویس لار...
@Raymond 2 سال پیش مطرح شد
مهدی چلواری
تخصص : جوجه برنامه نویس پایتون
@lasi9 2 سال پیش مطرح شد
0

ممنون با این کد حل شد pip install pygame --pre


برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام