Skip to content

How to install Charm-crypto library for python3 on windows 10? #258

@chaima99

Description

@chaima99

I wanted to use the Charm library in pycharm but this error occurred. I've installed the OpenSSL, GMP and PBC library but I couldn't understand how and where to run the commands of 'configure' and 'make'.. Please if anyone knows how to solve this tell me . I will appreciate it if anyone explains to me more the steps of the 'configure' command.

(venv) C:\Users\admin\PycharmProjects\Testing>pip3 install charm-crypto
Collecting charm-crypto
  Using cached Charm-Crypto-0.43.tar.gz (364 kB)
Requirement already satisfied: setuptools in c:\users\admin\pycharmprojects\testing\venv\lib\site-packages (from charm-crypto) (50.3.2)
Requirement already satisfied: pyparsing>=1.5.5 in c:\users\admin\pycharmprojects\testing\venv\lib\site-packages (from charm-crypto) (2.4.7)
Using legacy 'setup.py install' for charm-crypto, since package 'wheel' is not installed.
Installing collected packages: charm-crypto
    Running setup.py install for charm-crypto ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\admin\\AppData\
\Local\\Temp\\pip-install-lzdn4zzi\\charm-crypto\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-lzdn4zzi\\charm-crypto\\setup.py'"
'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-it05f_7j\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users
\admin\pycharmprojects\testing\venv\include\site\python3.9\charm-crypto'
         cwd: C:\Users\admin\AppData\Local\Temp\pip-install-lzdn4zzi\charm-crypto\
    Complete output (194 lines):
    Platform: Windows
    Config file: config.mk
    Warning, using default config vaules.
    You probably want to run ./configure.sh first.
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\charm
    copying charm\config.py -> build\lib.win-amd64-3.9\charm
    copying charm\__init__.py -> build\lib.win-amd64-3.9\charm
    creating build\lib.win-amd64-3.9\charm\core
    copying charm\core\__init__.py -> build\lib.win-amd64-3.9\charm\core
    creating build\lib.win-amd64-3.9\charm\core\crypto
    copying charm\core\crypto\__init__.py -> build\lib.win-amd64-3.9\charm\core\crypto
    creating build\lib.win-amd64-3.9\charm\core\engine
    copying charm\core\engine\protocol.py -> build\lib.win-amd64-3.9\charm\core\engine
    copying charm\core\engine\util.py -> build\lib.win-amd64-3.9\charm\core\engine
    copying charm\core\engine\__init__.py -> build\lib.win-amd64-3.9\charm\core\engine
    creating build\lib.win-amd64-3.9\charm\core\math
    copying charm\core\math\__init__.py -> build\lib.win-amd64-3.9\charm\core\math
    creating build\lib.win-amd64-3.9\charm\test
    copying charm\test\__init__.py -> build\lib.win-amd64-3.9\charm\test
    creating build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\abenc_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\chamhash_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\commit_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\dabenc_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\encap_bchk05_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\grpsig_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\hibenc_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\ibenc_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\pkenc_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\pksig_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\pk_vrf_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\rsa_alg_test.py -> build\lib.win-amd64-3.9\charm\test\schemes
    copying charm\test\schemes\__init__.py -> build\lib.win-amd64-3.9\charm\test\schemes
    creating build\lib.win-amd64-3.9\charm\test\toolbox
    copying charm\test\toolbox\conversion_test.py -> build\lib.win-amd64-3.9\charm\test\toolbox
    copying charm\test\toolbox\paddingschemes_test.py -> build\lib.win-amd64-3.9\charm\test\toolbox
    copying charm\test\toolbox\secretshare_test.py -> build\lib.win-amd64-3.9\charm\test\toolbox
    copying charm\test\toolbox\symcrypto_test.py -> build\lib.win-amd64-3.9\charm\test\toolbox
    copying charm\test\toolbox\__init__.py -> build\lib.win-amd64-3.9\charm\test\toolbox
    creating build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\ABEnc.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\ABEncMultiAuth.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\bitstring.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\Commit.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\conversion.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\DFA.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\eccurve.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\ecgroup.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\enum.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\FSA.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\Hash.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\hash_module.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\IBEnc.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\IBSig.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\integergroup.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\iterate.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\matrixops.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\node.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\paddingschemes.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\paddingschemes_test.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\pairingcurves.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\pairinggroup.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\PKEnc.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\PKSig.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\policytree.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\reCompiler.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\redundancyschemes.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\schemebase.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\secretshare.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\secretutil.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\securerandom.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\sigmaprotocol.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\specialprimes.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\symcrypto.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\xmlserialize.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\zknode.py -> build\lib.win-amd64-3.9\charm\toolbox
    copying charm\toolbox\__init__.py -> build\lib.win-amd64-3.9\charm\toolbox
    creating build\lib.win-amd64-3.9\charm\zkp_compiler
    copying charm\zkp_compiler\zkparser.py -> build\lib.win-amd64-3.9\charm\zkp_compiler
    copying charm\zkp_compiler\zkp_generator.py -> build\lib.win-amd64-3.9\charm\zkp_compiler
    copying charm\zkp_compiler\zk_demo.py -> build\lib.win-amd64-3.9\charm\zkp_compiler
    copying charm\zkp_compiler\__init__.py -> build\lib.win-amd64-3.9\charm\zkp_compiler
    creating build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\chamhash_adm05.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\chamhash_rsa_hw09.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\dabe_aw11.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\encap_bchk05.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\joye_scheme.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\lem_scheme.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\pk_fre_ccv11.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\pk_vrf.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\pre_mg07.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\protocol_a01.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\protocol_ao00.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\protocol_cns07.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\protocol_schnorr91.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\sigma1.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\sigma2.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\sigma3.py -> build\lib.win-amd64-3.9\charm\schemes
    copying charm\schemes\__init__.py -> build\lib.win-amd64-3.9\charm\schemes
    creating build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_bb03.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_bf01.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_ckrs09.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_cllww12_z.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_CW13_z.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_lsw08.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_sw05.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_waters05.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_waters05_z.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_waters09.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\ibenc_waters09_z.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    copying charm\schemes\ibenc\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\ibenc
    creating build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\abenc_bsw07.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\abenc_lsw08.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\abenc_waters09.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\abenc_yct14.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\dac-macs-yang-14.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\dfa_fe12.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\maabe-yang-14.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\pk_hve08.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\tbpre-liu-14.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    copying charm\schemes\abenc\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\abenc
    creating build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\pkenc_cs98.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\pkenc_elgamal85.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\pkenc_gm82.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\pkenc_paillier99.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\pkenc_rabin.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\pkenc_rsa.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    copying charm\schemes\pkenc\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\pkenc
    creating build\lib.win-amd64-3.9\charm\schemes\hibenc
    copying charm\schemes\hibenc\hibenc_bb04.py -> build\lib.win-amd64-3.9\charm\schemes\hibenc
    copying charm\schemes\hibenc\hibenc_lew11.py -> build\lib.win-amd64-3.9\charm\schemes\hibenc
    copying charm\schemes\hibenc\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\hibenc
    creating build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_bls04.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_boyen.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_chch.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_chp.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_cl03.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_cl04.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_cllww12_z.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_CW13_z.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_cyh.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_dsa.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_ecdsa.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_hess.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_hw.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_rsa_hw09.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_schnorr91.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_waters.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_waters05.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\pksig_waters09.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    copying charm\schemes\pksig\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\pksig
    creating build\lib.win-amd64-3.9\charm\schemes\commit
    copying charm\schemes\commit\commit_gs08.py -> build\lib.win-amd64-3.9\charm\schemes\commit
    copying charm\schemes\commit\commit_pedersen92.py -> build\lib.win-amd64-3.9\charm\schemes\commit
    copying charm\schemes\commit\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\commit
    creating build\lib.win-amd64-3.9\charm\schemes\grpsig
    copying charm\schemes\grpsig\groupsig_bgls04.py -> build\lib.win-amd64-3.9\charm\schemes\grpsig
    copying charm\schemes\grpsig\groupsig_bgls04_var.py -> build\lib.win-amd64-3.9\charm\schemes\grpsig
    copying charm\schemes\grpsig\__init__.py -> build\lib.win-amd64-3.9\charm\schemes\grpsig
    creating build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\abenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\dabenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\ibenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\ibenc_adapt_identityhash.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\kpabenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\pkenc_adapt_bchk05.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\pkenc_adapt_chk04.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\pkenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\pksig_adapt_naor01.py -> build\lib.win-amd64-3.9\charm\adapters
    copying charm\adapters\__init__.py -> build\lib.win-amd64-3.9\charm\adapters
    running build_ext
    building 'charm.core.math.pairing' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\charm
    creating build\temp.win-amd64-3.9\Release\charm\core
    creating build\temp.win-amd64-3.9\Release\charm\core\benchmark
    creating build\temp.win-amd64-3.9\Release\charm\core\math
    creating build\temp.win-amd64-3.9\Release\charm\core\math\pairing
    creating build\temp.win-amd64-3.9\Release\charm\core\utilities
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBENCHMARK_E
NABLED=1 -Icharm/core/utilities/ -Icharm/core/benchmark/ -Ic:\users\admin\pycharmprojects\testing\venv\include -IC:\Users\admin\AppData\Local\Programs\Python\Python3
9\include -IC:\Users\admin\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\
ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10
.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Fi
les (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tccharm/core/benchmark/benchmarkmodule.c
 /Fobuild\temp.win-amd64-3.9\Release\charm/core/benchmark/benchmarkmodule.obj
    benchmarkmodule.c
    C:\Users\admin\AppData\Local\Temp\pip-install-lzdn4zzi\charm-crypto\charm\core\benchmark\benchmarkmodule.h(12): fatal error C1083: Impossible d'ouvrir le fichier
 includeÿ: 'sys/time.h'ÿ: No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit cod
e 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0]
= '"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-lzdn4zzi\\charm-crypto\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-l
zdn4zzi\\charm-crypto\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(c
ode, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-it05f_7j\install-record.txt' --single-version-externally-managed --co
mpile --install-headers 'c:\users\admin\pycharmprojects\testing\venv\include\site\python3.9\charm-crypto' Check the logs for full command output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions