JHUISI / charm

Charm: A Framework for Rapidly Prototyping Cryptosystems
http://charm-crypto.io
GNU Lesser General Public License v3.0
541 stars 166 forks source link

Installing charm-dev on Ubuntu python3.8 HELP! #260

Closed Rabieh07 closed 11 months ago

Rabieh07 commented 3 years ago

Iam trying to compile charm-dev on Ubuntu using python 3.8. After I did sudo make install, I cannot run benchmark_test.py. The problem seems to me in charm.core.math.integer. The following is exactly the error I have,. Any help is appreciated

username@ubuntu:~/charm/charm-dev/charm/test/benchmark$ python3 benchmark_test.py ERROR: module load failed! Traceback (most recent call last): File "benchmark_test.py", line 4, in from charm.core.math.integer import * SystemError: initialization of integer failed without raising an exception

nikosft commented 3 years ago

Try running sudo ldconfig after finishing the installation.

lrusso96 commented 3 years ago

@nikosft @Rabieh07 I had a similar issue and I had to downgrade to Python 3.7.

terry-fee commented 11 months ago

Looks like Python 3.8 and above does not like the arguments of a C extension function to be declared as METH_O | METH_NOARGS in integermodule.c. This ultimately caused the initialisation of the Python object to fail silently and without error messages.

I have created a pull request for this.