-1
Collecting pycryptodome
  Using cached https://files.pythonhosted.org/packages/b9/05/0e7547c445bbbc96c538d870e6c5c5a69a9fa5df0a9df3e27cb126527196/pycryptodome-3.18.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\GMANASWI\AppData\Local\Continuum\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GMANASWI\\AppData\\Local\\Temp\\pip-install-sdrt7wvj\\pycryptodome\\setup.py'"'"'; __file__='"'"'C:\\Users\\GMANASWI\\AppData\\Local\\Temp\\pip-install-sdrt7wvj\\pycryptodome\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\GMANASWI\AppData\Local\Temp\pip-install-sdrt7wvj\pycryptodome\
    Complete output (20 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\GMANASWI\AppData\Local\Temp\pip-install-sdrt7wvj\pycryptodome\setup.py", line 488, in <module>
        set_compiler_options(package_root, ext_modules)
      File "C:\Users\GMANASWI\AppData\Local\Temp\pip-install-sdrt7wvj\pycryptodome\compiler_opt.py", line 327, in set_compiler_options
        clang = compiler_is_clang()
      File "C:\Users\GMANASWI\AppData\Local\Temp\pip-install-sdrt7wvj\pycryptodome\compiler_opt.py", line 251, in compiler_is_clang
        return test_compilation(source, msg="clang")
      File "C:\Users\GMANASWI\AppData\Local\Temp\pip-install-sdrt7wvj\pycryptodome\compiler_opt.py", line 82, in test_compilation
        objects = compiler.compile([fname], extra_postargs=extra_cc_options)
      File "C:\Users\GMANASWI\AppData\Local\Continuum\anaconda3\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 343, in compile
        self.initialize()
      File "C:\Users\GMANASWI\AppData\Local\Continuum\anaconda3\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 253, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "C:\Users\GMANASWI\AppData\Local\Continuum\anaconda3\lib\site-packages\setuptools\msvc.py", line 210, in msvc14_get_vc_env
        return _msvc14_get_vc_env(plat_spec)
      File "C:\Users\GMANASWI\AppData\Local\Continuum\anaconda3\lib\site-packages\setuptools\msvc.py", line 165, in _msvc14_get_vc_env
        "Unable to find vcvarsall.bat"
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    Testing support for clang
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Hi, while installing pycrptodome, for running a python file, I am getting error as such, kindly look into same, if someone faced similar issue please let me know, I have also checked for _msvccompiler.py filr in specified location

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13
  • Microsoft Visual C++ 14.0 is Visual Studio 2015. Refer to the answer from @mingjie-msft below. Sometimes I find that Visual Studio 2022 is too new for some packages. Usually Visual Studio 2019 works for those cases. The older versions are still available for download. – John Hanley May 29 '23 at 20:13

1 Answers1

0
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

It has shown the solution that you have to download Microsoft Visual C++ 14.0 or greater from this link.

After download Visual Studio Installer.

Click Modify button. enter image description here

Then choose Desktop development with C++

enter image description here

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13