Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"ModuleNotFoundError: No module named 'binascii'" while installing Normaliz in Sage 9.3

Running sage -i normaliz results in the following error:

[python3-3.9.2] LD_LIBRARY_PATH=/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src CC='gcc -pthread' LDSHARED='gcc -pthread -shared -Wl,-rpath-link,/home/maxal/SageMath.93/local/lib -L/home/maxal/SageMath.93/local/lib -Wl,-rpath,/home/maxal/SageMath.93/local/lib  -L. -Wl,-rpath-link,/home/maxal/SageMath.93/local/lib -L/home/maxal/SageMath.93/local/lib -Wl,-rpath,/home/maxal/SageMath.93/local/lib   ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python -E ./setup.py  build
[python3-3.9.2] Traceback (most recent call last):
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src/./setup.py", line 33, in <module>
[python3-3.9.2]     from distutils import log
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 83, in create_module
[python3-3.9.2]     return importlib.import_module('setuptools._distutils')
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src/Lib/importlib/__init__.py", line 127, in import_module
[python3-3.9.2]     return _bootstrap._gcd_import(name[level:], package, level)
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/setuptools/__init__.py", line 16, in <module>
[python3-3.9.2]     import setuptools.version
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/setuptools/version.py", line 1, in <module>
[python3-3.9.2]     import pkg_resources
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 23, in <module>
[python3-3.9.2]     import zipfile
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src/Lib/zipfile.py", line 6, in <module>
[python3-3.9.2]     import binascii
[python3-3.9.2] ModuleNotFoundError: No module named 'binascii'
[python3-3.9.2] make[4]: *** [Makefile:638: sharedmods] Error 1
[python3-3.9.2] ********************************************************************************
[python3-3.9.2] Error building python3-3.9.2
[python3-3.9.2] ********************************************************************************

How to deal with it?

"ModuleNotFoundError: No module named 'binascii'" while installing Normaliz in Sage 9.3

I'm using Sage 9.3. installed from sage-9.3-Ubuntu_20.04-x86_64.tar.bz2.

Running sage -i normaliz from results in the following error:

[python3-3.9.2] LD_LIBRARY_PATH=/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src CC='gcc -pthread' LDSHARED='gcc -pthread -shared -Wl,-rpath-link,/home/maxal/SageMath.93/local/lib -L/home/maxal/SageMath.93/local/lib -Wl,-rpath,/home/maxal/SageMath.93/local/lib  -L. -Wl,-rpath-link,/home/maxal/SageMath.93/local/lib -L/home/maxal/SageMath.93/local/lib -Wl,-rpath,/home/maxal/SageMath.93/local/lib   ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python -E ./setup.py  build
[python3-3.9.2] Traceback (most recent call last):
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src/./setup.py", line 33, in <module>
[python3-3.9.2]     from distutils import log
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 83, in create_module
[python3-3.9.2]     return importlib.import_module('setuptools._distutils')
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src/Lib/importlib/__init__.py", line 127, in import_module
[python3-3.9.2]     return _bootstrap._gcd_import(name[level:], package, level)
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/setuptools/__init__.py", line 16, in <module>
[python3-3.9.2]     import setuptools.version
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/setuptools/version.py", line 1, in <module>
[python3-3.9.2]     import pkg_resources
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 23, in <module>
[python3-3.9.2]     import zipfile
[python3-3.9.2]   File "/home/maxal/SageMath.93/local/var/tmp/sage/build/python3-3.9.2/src/Lib/zipfile.py", line 6, in <module>
[python3-3.9.2]     import binascii
[python3-3.9.2] ModuleNotFoundError: No module named 'binascii'
[python3-3.9.2] make[4]: *** [Makefile:638: sharedmods] Error 1
[python3-3.9.2] ********************************************************************************
[python3-3.9.2] Error building python3-3.9.2
[python3-3.9.2] ********************************************************************************

How to deal with it?