在Macbook上安装pytabix的问题

时间:2020-08-31 04:31:50

标签: python-2.7

我正在尝试安装pytabix软件包以在python 2.7.18版本上运行一些脚本。但是,在通过pip install pytabix

进行安装的过程中,我收到此错误消息

这是错误消息:

Installing collected packages: pytabix
  Running setup.py install for pytabix ... error

    ERROR: Command errored out with exit status 1:

     command: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nn/r79_1jvx02n3l31_9hkk9jsw0000gn/T/pip-install-AGIV85/pytabix/setup.py'"'"'; __file__='"'"'/private/var/folders/nn/r79_1jvx02n3l31_9hkk9jsw0000gn/T/pip-install-AGIV85/pytabix/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/var/folders/nn/r79_1jvx02n3l31_9hkk9jsw0000gn/T/pip-record-_HD_40/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/nn/r79_1jvx02n3l31_9hkk9jsw0000gn/T/pip-install-AGIV85/pytabix/
    Complete output (17 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-2.7
    creating build/lib.macosx-10.9-x86_64-2.7/test
    copying test/__init__.py -> build/lib.macosx-10.9-x86_64-2.7/test
    copying test/test.py -> build/lib.macosx-10.9-x86_64-2.7/test
    copying test/example.gtf.gz -> build/lib.macosx-10.9-x86_64-2.7/test
    copying test/example.gtf.gz.tbi -> build/lib.macosx-10.9-x86_64-2.7/test
    running build_ext
    building 'tabix' extension
    creating build/temp.macosx-10.9-x86_64-2.7
    creating build/temp.macosx-10.9-x86_64-2.7/src
    gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/bgzf.c -o build/temp.macosx-10.9-x86_64-2.7/src/bgzf.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    error: command 'gcc' failed with exit status 1

1 个答案:

答案 0 :(得分:0)

Here,您可以找到答案:

xcode-select --install

该错误显示xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun,因此您需要查找此错误以解决该问题。

下一个命令也可能是解决方案:

xcode-select --reset

如果仍然没有帮助,请尝试下一个:

sudo xcode-select -switch /Library/Developer/CommandLineTools