-1

I tried to install the module RichDem using the code bellow

$ pip install richdem

i got the error:

Installing collected packages: richdem
  Running setup.py install for richdem ... error
  error: subprocess-exited-with-error

  × Running setup.py install for richdem did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Warning! Could not find RichDEM version. Software will still work, but reproducibility will be compromised.
      Using RichDEM hash=Unknown, time=Unknown
      C:\Users\engfl\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      running install
      C:\Users\engfl\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\richdem
      copying richdem\cli.py -> build\lib.win-amd64-cpython-311\richdem
      copying richdem\__init__.py -> build\lib.win-amd64-cpython-311\richdem
      running build_ext
      COMPILER msvc
      COMPILER ARGUMENTS ['-std=c++11', '-g', '-fvisibility=hidden', '-O3']
      building '_richdem' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.


× Encountered error while trying to install package.
╰─> richdem

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I've tried to solve it by installing for conda, but it didn't work. Someone could help me?

i tried to install richdem

py pip
  • 1
  • 1
    This line tells you exactly what went wrong: `error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/`. Make sure you have Microsoft Visual C++ installed (with the version being greater or equal to 14.0) – Clasherkasten Dec 23 '22 at 02:09
  • https://stackoverflow.com/search?q=%5Bpip%5D+error%3A+Microsoft+Visual+C%2B%2B+14.0+or+greater+is+required – phd Dec 23 '22 at 02:14
  • Or [`conda install -c conda-forge richdem`](https://anaconda.org/conda-forge/richdem) – phd Dec 23 '22 at 02:15

1 Answers1

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

You need Microsoft Visual C++ 14.0. Check out this solution.

WhaSukGO
  • 575
  • 7
  • 17