简体   繁体   中英

Cannot install python package due to cmake error

I am trying to install the disptools package by doing pip install disptools in my terminal. The disptools package is linked here https://github.com/m-pilia/disptools . It gives me a long error message during the installation with the main error displayed below.

Building wheel for disptools (setup.py) ... error
ERROR: Command errored out with exit status 1:

...

CMake Error:

Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)`

It also includes this in the error:

File "/Users/name/anaconda3/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/6p/16591qb93vs76dysmldcz8140000gn/T/pip-install-vn5twf6v/disptools', '-DDISPTOOLS_DEBUG=OFF', '-DDISPTOOLS_OPT=OFF', '-DDISPTOOLS_VERBOSE=ON', '-DDISPTOOLS_LOW_ORDER_PD=OFF', '-DDISPTOOLS_DOUBLE=OFF', '-DDISPTOOLS_CUDA_SUPPORT=OFF', '-DDISPTOOLS_CUDA_ERROR_CHECK=ON', '-DDISPTOOLS_CUDA_ERROR_CHECK_SYNC=ON', '-DDISPTOOLS_PYTHON_SUPPORT=ON', '-DDISPTOOLS_PYTHON_C_MODULE_NAME=_disptools', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/private/var/folders/6p/16591qb93vs76dysmldcz8140000gn/T/pip-install-vn5twf6v/disptools/build/lib.macosx-10.9-x86_64-3.6', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Users/name/anaconda3/bin/python3']' 
returned non-zero exit status 1.

I have looked everywhere online but I couldn't really find any helpful resources for solving this problem. Would really appreciate it if someone can help.

With commands, python -m pip install disptools you try to download, compile and install the disptools .

Compilation step fails with a CMake error that tell that it failed to find library OpenMP . You can install it on a Ubuntu/Debian distribution with

sudo apt install libomp-dev

After this, you can launch again the pip command.

I hope you will meet all compilation requirements.

If you are using Anaconda Prompt (recommended),

conda install -c conda-forge dlib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM