petermr / docanalysis

Semantic analysis of text documents including sentence and paragraph splitting
Apache License 2.0
13 stars 3 forks source link

pycryptodome: Command errored out with exit status #21

Open Enakshi-1998 opened 2 years ago

Enakshi-1998 commented 2 years ago

Input:

pip install docanalysis

Error Shown:

Collecting pycryptodome (from pdfminer3->py4ami==0.0.16->docanalysis)
  Using cached https://files.pythonhosted.org/packages/11/e4/a8e8056a59c39f8c9ddd11d3bc3e1a67493abe746df727e531f66ecede9e/pycryptodome-3.15.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\enaks\docanalysis_tutorial\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\enaks\\AppData\\Local\\Temp\\pip-install-hc0xmtww\\pycryptodome\\setup.py'"'"'; __file__='"'"'C:\\Users\\enaks\\AppData\\Local\\Temp\\pip-install-hc0xmtww\\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\enaks\AppData\Local\Temp\pip-install-hc0xmtww\pycryptodome\
    Complete output (31 lines):
    Traceback (most recent call last):
      File "c:\users\enaks\docanalysis_tutorial\venv\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
        return self.find_available_vc_vers()[-1]
    IndexError: list index out of range

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\enaks\AppData\Local\Temp\pip-install-hc0xmtww\pycryptodome\setup.py", line 488, in <module>
        set_compiler_options(package_root, ext_modules)
      File "C:\Users\enaks\AppData\Local\Temp\pip-install-hc0xmtww\pycryptodome\compiler_opt.py", line 341, in set_compiler_options
        clang = compiler_is_clang()
      File "C:\Users\enaks\AppData\Local\Temp\pip-install-hc0xmtww\pycryptodome\compiler_opt.py", line 251, in compiler_is_clang
        return test_compilation(source, msg="clang")
      File "C:\Users\enaks\AppData\Local\Temp\pip-install-hc0xmtww\pycryptodome\compiler_opt.py", line 82, in test_compilation
        objects = compiler.compile([fname], extra_postargs=extra_cc_options)
      File "C:\Users\enaks\AppData\Local\Programs\Python\Python38\lib\distutils\_msvccompiler.py", line 360, in compile
        self.initialize()
      File "C:\Users\enaks\AppData\Local\Programs\Python\Python38\lib\distutils\_msvccompiler.py", line 253, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\users\enaks\docanalysis_tutorial\venv\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:\users\enaks\docanalysis_tutorial\venv\lib\site-packages\setuptools\msvc.py", line 843, in __init__
        self.si = SystemInfo(self.ri, vc_ver)
      File "c:\users\enaks\docanalysis_tutorial\venv\lib\site-packages\setuptools\msvc.py", line 485, in __init__
        self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
      File "c:\users\enaks\docanalysis_tutorial\venv\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
        raise distutils.errors.DistutilsPlatformError(err)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    Testing support for clang
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ShweataNHegde commented 2 years ago

Could you please specify your python version, again?

Enakshi-1998 commented 2 years ago

It's 3.8.0(I uninstalled my 3.10 and installed this version to run docanalysis)

Enakshi-1998 commented 2 years ago

@ShweataNHegde is there any solution to this error?

ayush4921 commented 2 years ago

In my opinion, this is a common python c++ library error. Check out https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.2_standalone:_Build_Tools_for_Visual_Studio_2019_.28x86.2C_x64.2C_ARM.2C_ARM64.29