Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't install pytezos on python 3.12 #360

Closed
nicolasochem opened this issue Feb 20, 2024 · 3 comments
Closed

can't install pytezos on python 3.12 #360

nicolasochem opened this issue Feb 20, 2024 · 3 comments

Comments

@nicolasochem
Copy link

pysha3 error

Building wheels for collected packages: pysha3, secp256k1, pyblake2, pyzmq                                                                                    
  Building wheel for pysha3 (pyproject.toml) ... error                                                                                                        
  error: subprocess-exited-with-error                                                                                                                         
                                                                                                                                                              
  × Building wheel for pysha3 (pyproject.toml) did not run successfully.                                                                                      
  │ exit code: 1                                                                                                                                              
  ╰─> [18 lines of output]                                                                                                                                    
      running bdist_wheel                                                                                                                                     
      running build                                                                                                                                           
      running build_py                                                                                                                                        
      creating build                                                                                                                                          
      creating build/lib.linux-x86_64-cpython-312                                                                                                             
      copying sha3.py -> build/lib.linux-x86_64-cpython-312                                                                                                   
      running build_ext                                                                                                                                       
      building '_pysha3' extension                                                                                                                            
      creating build/temp.linux-x86_64-cpython-312                                                                                                            
      creating build/temp.linux-x86_64-cpython-312/Modules                                                                                                    
      creating build/temp.linux-x86_64-cpython-312/Modules/_sha3                                                                                              
      gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions 
-fcf-protection -fPIC -DPY_WITH_KECCAK=1 -I/home/nochem/workspace/tezos-k8s/mkchain/venv/include -I/usr/include/python3.12 -c Modules/_sha3/sha3module.c -o bu
ild/temp.linux-x86_64-cpython-312/Modules/_sha3/sha3module.o                                                                                                  
      In file included from Modules/_sha3/sha3module.c:20:                                                                                                    
      Modules/_sha3/backport.inc:78:10: fatal error: pystrhex.h: No such file or directory                                                                    
         78 | #include "pystrhex.h"                                                                                                                           
            |          ^~~~~~~~~~~~                                                                                                                           
      compilation terminated.                                                                                                                                 
      error: command '/usr/bin/gcc' failed with exit code 1                                                                                                   
      [end of output]                                                                                                                                         
                                                                                                                                                              
  note: This error originates from a subprocess, and is likely not a problem with pip.                                                                        
  ERROR: Failed building wheel for pysha3     

Aparently it's deprecated

secp256k1

 error: invalid use of incomplete typedef ‘ECDSA_S
IG’ {aka ‘struct ECDSA_SIG_st’}

pyblake2

  pyblake2module.c: In function ‘PyInit_pyblake2’:                                                                                                        
  pyblake2module.c:699:27: error: lvalue required as left operand of assignment                                                                           
    699 |     Py_TYPE(&blake2bType) = &PyType_Type;                                                                                                       
        |                           ^                                                                                                                     
  pyblake2module.c:703:27: error: lvalue required as left operand of assignment                                                                           
    703 |     Py_TYPE(&blake2sType) = &PyType_Type;                                                                                                       
        |                           ^                                                                                                                     
  error: command '/usr/bin/gcc' failed with exit code 1                                                                                                   
  [end of output]                                                                                                                                         

pyzmq

warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
@hoh
Copy link

hoh commented Jun 21, 2024

On the same topic of pytezos not working on Python 3.12, I am facing issues related to secp256k1 that prevent me from using pytezos with Python 3.12.

That library seems has not seen any update for more than 2 years, would it make sense to fork it or replace it with coincurve ?

@droserasprout
Copy link
Member

I agree, secp256k1 is a pain in the ass. Coincidentally, I am currently investating another weird issue in CI! https://github.com/baking-bad/pytezos/actions/runs/9614856495/job/26520674888

coincurve is nice and well-maintained; we should definitely make a switch. But this library not a drop-in replacement, so it's not an instant task.

@droserasprout
Copy link
Member

droserasprout commented Jun 24, 2024

Closing, py3.12 is supported since 3.12.0 and seems to be working.

To fix the secp256k1 issue drop the virtual environment and CI cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants