0

I am trying to use the python API in libpqcrypto (https://libpqcrypto.org/index.html). I followed the installation and was able to import it to python but I get an error when I try to run the program.

Traceback (most recent call last):
  File "PQimport.py", line 1, in <module>
    import pqcrypto
  File "/home/libpqcrypto/libpqcrypto-20180314/python/pqcrypto.py", line 218
    %crypto_hash: x += [('PRIMITIVE',CRYPTO_BYTES)]
    ^
SyntaxError: invalid syntax

How do I address this issue?

Thank you.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Please provide a [mcve], as well as some information on your environment. – AMC Mar 20 '20 at 00:31
  • After following the instructions on the website, I exported the path to the library to python using export PYTHONPATH=/home/libpqcrypto/libpqcrypto-20180314/python. Then I wrote a python program that imports pqcrypto and prints done if there are no errors (This was just to test the import). The program was written on a Ubuntu 18.04 vm. – chandramouli pranav Mar 20 '20 at 09:06
  • @chandramoulipranav, have you resolved the problem? – ralien Jan 04 '23 at 08:28

0 Answers0