在MacOS Mojave中安装ucl期间出现错误

时间:2018-10-28 20:48:56

标签: python pip

我在MacOS Mojave上安装时遇到问题。 我的项目中需要一个ucl库。我不了解python。我需要运行一次准备好的代码。 当我尝试时:

MBP-ukasz:psCMS2 lukasz$ sudo pip install ucl

我有错误:

The directory '/Users/lukasz/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/lukasz/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ucl
  Downloading https://files.pythonhosted.org/packages/53/a5/fedfc8af32519d2fb172736b7b101239004ae30bdcc036a7c1fdeb152927/ucl-0.8.1.tar.gz
Installing collected packages: ucl
  Running setup.py install for ucl ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-DBLg7v/ucl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-huMBs9/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'ucl' extension
    creating build
    creating build/temp.macosx-10.14-intel-2.7
    creating build/temp.macosx-10.14-intel-2.7/src
    cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/uclmodule.c -o build/temp.macosx-10.14-intel-2.7/src/uclmodule.o
    src/uclmodule.c:2:10: fatal error: 'ucl.h' file not found
    #include <ucl.h>
             ^~~~~~~
    1 error generated.
    error: command 'cc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-DBLg7v/ucl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-huMBs9/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-DBLg7v/ucl/

我该如何解决?

0 个答案:

没有答案