pqcrypto
pqcrypto copied to clipboard
Module doesn't exist
I Pip installed the package, imported like what's showing for the examples, tried to run and I get the following error.
Traceback (most recent call last):
File "/home/ori/Desktop/playground/latty/latty.py", line 1, in <module>
from pqcrypto.kem.kyber1024_90s import generate_keypair, encrypt, decrypt
File "/home/ori/Desktop/playground/latty/pqlENV/lib/python3.10/site-packages/pqcrypto/kem/kyber1024_90s.py", line 1, in <module>
from .._kem.kyber1024_90s import ffi as __ffi, lib as __lib
ModuleNotFoundError: No module named 'pqcrypto._kem.kyber1024_90s'
Anything in the _kem
directory is not there. It's empty. (Except for the very empty .gitkeep file)
TLDR: execute compile.py in the source code before pip installing pqcrypto. The instructions as is are incomplete.
I don't really have anything to do with this repository, but I found a main statement in compile.py of this source code that would build/compile the project, but that isn't seem to be invoked in the poetry build process nor specified in procedure outlined on the project's main page. It might look something like the following given the build code's current state:
Using poetry
pip install poetry python compile.py poetry build
Even after following your steps it doesn't work. Same error still. Can you help me please? _kem directory is now not empty but still cannot reference it in python script.
I tried and succeeded thanks
@Erebus9456 ok , this is how to fix this error after installing using pip 1- download the source code 2- cd into the source code directory 3- sudo python3 compile.py (may take a while to compile) , this will create a _kem directory in ./pqcrypto/ 4- go to the package directory downloaded by pip , usually in /home/$USER/.local/lib/python3.11/site-packages/pqcrypto 5- create a init.py file in kem directory 6- remove _kem directory 7- cp _kem from compiled source code into the downloaded package by pip
Hi everyone, maintainer here. I believe this cluster of issues is due to a regression in Poetry, it no longer seems to respect tool.poetry.build
. I'll look into it soon.
@kpdemetriou that would be great, thanks
Mình đã thỠvà thà nh công thanks
help me
@Duongguyen Checkout my package , is very simple and easy to use