[Python] Errore durante installazione via pip.

iz4apu a libero.it iz4apu a libero.it
Mer 2 Nov 2022 15:43:23 CET


Salve a tutti.

Chiedo perdono per l'enormità del traceback.

Qualcuno ha idea del perché non riesca ad installare pygame via pip?

Ottengo questo:

 

E:\Dropbox\py>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                                                                                                        

  ╰─> [103 lines of output]                                                                                             

                                                                                                                        

                                                                                                                        

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

      Using WINDOWS configuration...                                                                                    

                                                                                                                        

      Traceback (most recent call last):                                                                                

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1348, in do_open 

          h.request(req.get_method(), req.selector, req.data, headers,                                                  

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1282, in request    

          self._send_request(method, url, body, headers, encode_chunked)                                                

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1328, in _send_request                                                                                                                      

          self.endheaders(body, encode_chunked=encode_chunked)                                                          

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1277, in endheaders 

          self._send_output(message_body, encode_chunked=encode_chunked)                                                

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1037, in _send_output                                                                                                                       

          self.send(msg)                                                                                                

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 975, in send        

          self.connect()                                                                                                

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1454, in connect    

          self.sock = self._context.wrap_socket(self.sock,                                                              

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 517, in wrap_socket         

          return self.sslsocket_class._create(                                                                          

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1075, in _create            

          self.do_handshake()                                                                                           

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1346, in do_handshake       

          self._sslobj.do_handshake()                                                                                   

      ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_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\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\setup.py", line 359, in <module>                                                                                              

          buildconfig.config.main(AUTO_CONFIG)                                                                          

        File "C:\Users\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\buildconfig\config.py", line 225, in main                                                                                     

          deps = CFG.main(**kwds)                                                                                       

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

        File "C:\Users\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\buildconfig\config_win.py", line 497, in main                                                                                 

          and download_win_prebuilt.ask(**download_kwargs):                                                             

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

        File "C:\Users\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\buildconfig\download_win_prebuilt.py", line 290, in ask                                                                       

          update(x86=x86, x64=x64)                                                                                      

        File "C:\Users\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\buildconfig\download_win_prebuilt.py", line 273, in update                                                                    

          download_prebuilts(download_dir, x86=x86, x64=x64)                                                            

        File "C:\Users\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\buildconfig\download_win_prebuilt.py", line 124, in download_prebuilts                                                        

          download_sha1_unzip(url, checksum, temp_dir, 1)                                                               

        File "C:\Users\GBattaglia\AppData\Local\Temp\pip-install-8ljnvap6\pygame_add3c60f88764b75a9ff931a4fb551d0\buildconfig\download_win_prebuilt.py", line 54, in download_sha1_unzip                                                        

          response = urllib.urlopen(request).read()                                                                     

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 216, in urlopen  

          return opener.open(url, data, timeout)                                                                        

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 525, in open     

          response = meth(req, response)                                                                                

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 634, in http_response                                                                                                                    

          response = self.parent.error(                                                                                 

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 557, in error    

          result = self._call_chain(*args)                                                                              

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain                                                                                                                      

          result = func(*args)                                                                                          

                   ^^^^^^^^^^^                                                                                          

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 749, in http_error_302                                                                                                                   

          return self.parent.open(new, timeout=req.timeout)                                                             

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 519, in open     

          response = self._open(req, data)                                                                              

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 536, in _open    

          result = self._call_chain(self.handle_open, protocol, protocol +                                              

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain                                                                                                                      

          result = func(*args)                                                                                          

                   ^^^^^^^^^^^                                                                                          

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1391, in https_open                                                                                                                      

          return self.do_open(http.client.HTTPSConnection, req,                                                         

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

        File "C:\Users\GBattaglia\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1351, in do_open 

          raise URLError(err)                                                                                           

      urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)>                                                                              

      Making dir :prebuilt_downloads:                                                                                   

      Downloading...  <https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip> 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> 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> 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> https://www.pygame.org/ftp/jpegsr9d.zip ed10aa2b5a0fcfe74f8a6f7611aeb346b06a1f99                   

                                                                                                                        

      ---                                                                                                               

      For help with compilation see:                                                                                    

           <https://www.pygame.org/wiki/CompileWindows> https://www.pygame.org/wiki/CompileWindows                                                                    

      To contribute to pygame development see:                                                                          

           <https://www.pygame.org/contribute.html> 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.                                                                                            

                                                                                                                        

E:\Dropbox\py>

 

 

Gabriele Battaglia (Gabe / Gabry) - IZ4APU

--... ...--  -.. .  .. --.. ....- .- .--. ..-  - ..-  . .

Sent from Outlook on Windows, Genus Bononiae's computer. (Libero)

 

-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.python.it/pipermail/python/attachments/20221102/26cb1a3c/attachment-0001.html>


Maggiori informazioni sulla lista Python