I'm getting this error when i try to pip install cryptodome :
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\hp\AppData\Local\Temp\pip-install-n9q1xfuw\pycryptodome_520086b2afc74db3bef1d6098b1acac3\setup.py", line 474, in <module>
set_compiler_options(package_root, ext_modules)
File "C:\Users\hp\AppData\Local\Temp\pip-install-n9q1xfuw\pycryptodome_520086b2afc74db3bef1d6098b1acac3\compiler_opt.py", line 341, in set_compiler_options
clang = compiler_is_clang()
File "C:\Users\hp\AppData\Local\Temp\pip-install-n9q1xfuw\pycryptodome_520086b2afc74db3bef1d6098b1acac3\compiler_opt.py", line 251, in compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Users\hp\AppData\Local\Temp\pip-install-n9q1xfuw\pycryptodome_520086b2afc74db3bef1d6098b1acac3\compiler_opt.py", line 82, in test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\_msvccompiler.py", line 343, in compile
self.initialize()
File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\_msvccompiler.py", line 246, in initialize
raise DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
Testing support for clang
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Is this a problem with my ming compiler ?, Please help.
I tried upgrading my setuptools using
pip install --upgrade setuptools
still no luck.
It was a problem with the python installation, I clean reinstalled python and was able to install the library successfully.