on windows i give tis errore with Python 3.12.4
Microsoft Windows [Version 10.0.19045.4529]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Stole>cd C:\conax
C:\conax>python getRSA-cnxV10c.py
File "C:\conax\getRSA-cnxV10c.py", line 142
print gcd_result_hex[2:].upper()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
on debian i give this errore Python 2.7.16
root@debian:/home/conax# python getRSA-cnxV10c.py
Traceback (most recent call last):
File "getRSA-cnxV10c.py", line 9, in <module>
from gmpy2 import gcd,mpz,powmod
ImportError: No module named gmpy2
root@debian:/home/conax# pip install gmpy2
Collecting gmpy2
Using cached
https://files.pythonhosted.org/packages ... 1.5.tar.gz
Building wheels for collected packages: gmpy2
Running setup.py bdist_wheel for gmpy2 ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-afhyGK/gmpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-MgQJje --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/gmpy2
copying gmpy2/__init__.py -> build/lib.linux-x86_64-2.7/gmpy2
running egg_info
writing gmpy2.egg-info/PKG-INFO
writing top-level names to gmpy2.egg-info/top_level.txt
writing dependency_links to gmpy2.egg-info/dependency_links.txt
reading manifest file 'gmpy2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'gmpy2.egg-info/SOURCES.txt'
copying gmpy2/__init__.pxd -> build/lib.linux-x86_64-2.7/gmpy2
copying gmpy2/gmpy2.h -> build/lib.linux-x86_64-2.7/gmpy2
copying gmpy2/gmpy2.pxd -> build/lib.linux-x86_64-2.7/gmpy2
running build_ext
building 'gmpy2.gmpy2' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/reproducible-path/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I./src -I/usr/include/python2.7 -c src/gmpy2.c -o build/temp.linux-x86_64-2.7/src/gmpy2.o -DSHARED=1
In file included from src/gmpy2.c:517:
src/gmpy2.h:79:12: fatal error: gmp.h: No such file or directory
# include <gmp.h>
^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for gmpy2
Running setup.py clean for gmpy2
Failed to build gmpy2
Installing collected packages: gmpy2
Running setup.py install for gmpy2 ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-afhyGK/gmpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-caMSJy/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/gmpy2
copying gmpy2/__init__.py -> build/lib.linux-x86_64-2.7/gmpy2
running egg_info
writing gmpy2.egg-info/PKG-INFO
writing top-level names to gmpy2.egg-info/top_level.txt
writing dependency_links to gmpy2.egg-info/dependency_links.txt
reading manifest file 'gmpy2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'gmpy2.egg-info/SOURCES.txt'
copying gmpy2/__init__.pxd -> build/lib.linux-x86_64-2.7/gmpy2
copying gmpy2/gmpy2.h -> build/lib.linux-x86_64-2.7/gmpy2
copying gmpy2/gmpy2.pxd -> build/lib.linux-x86_64-2.7/gmpy2
running build_ext
building 'gmpy2.gmpy2' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/reproducible-path/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I./src -I/usr/include/python2.7 -c src/gmpy2.c -o build/temp.linux-x86_64-2.7/src/gmpy2.o -DSHARED=1
In file included from src/gmpy2.c:517:
src/gmpy2.h:79:12: fatal error: gmp.h: No such file or directory
# include <gmp.h>
^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-afhyGK/gmpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-caMSJy/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-afhyGK/gmpy2/