【发布时间】:2019-10-02 23:30:49
【问题描述】:
我试图安装一个拼接程序“MAJIQ”。我能够在 Centos 上运行它,但无法在 MAC OS 上安装。
MAJIQ 程序说明。
安装前 MAJIQ 安装需要在您的系统中安装以下库/软件。
带有 openMP 的 C++11 编译器。 GCC 默认包含这些,但可以更新 clang 以包含这些 (Clang/OMP)。 MAJIQ/VOILA 已经过测试,可与 GNU GCC>=7.2、RedHat GCC>=4.7.2 一起使用。 HTSlib 库。这是一个由 Samtools 组织开发的用于读/写高通量测序数据的 C 库。 MAJIQ 安装假定库及其头文件存在于 Unix 默认位置(/usr/local/lib、/usr/local/include)。如果不是这种情况,可以通过设置以下环境变量来指定适当的位置。
$ export HTSLIB_LIBRARY_DIR=/path/to/htslib/lib
$ export HTSLIB_INCLUDE_DIR=/path/to/htslib/include
安装 要下载并安装 MAJIQ/Voila,请运行以下命令:
$ python3 -m venv env
$ source env/bin/activate
$ pip install pip -U
$ pip install wheel setuptools -U
$ pip install cython numpy GitPython -U
$ pip install git+https://bitbucket.org/biociphers/majiq_stable.git#egg=majiq
如果在安装过程中出现错误,请确认您正在使用 python 3 安装这些软件包并且安装的 pip 版本是最新的。另外,检查您是否安装了 git、c 编译器(gcc、clang 等)和 zlib。
疑难解答
1) 我尝试过 conda install llvm、conda install gcc 或 conda install libgcc from https://github.com/velocyto-team/velocyto.py/issues/53
2) 另外,以给定的方式尝试。
brew install llvm
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
输出错误
In file included from /private/var/root/env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
/private/var/root/env/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with " \
^
1 warning generated.
g++ -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.7/majiq/src/polyfitnb.o -o build/lib/majiq/src/polyfitnb.cpython-37m-darwin.so
building 'majiq.src.build' extension
creating build/temp.macosx-10.9-x86_64-3.7/majiq/src/internals
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I./majiq/src/internals -I./voila/c -Imajiq/src/internals -Ivoila/c -I/private/var/root/env/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include -I/private/var/root/env/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c majiq/src/build.cpp -o build/temp.macosx-10.9-x86_64-3.7/majiq/src/build.o -fopenmp -DSCYTHE_COMPILE_DIRECT -DSCYTHE_PTHREAD
clang: error: unsupported option '-fopenmp'
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/private/var/root/env/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/tmp/pip-install-8vjv35m9/majiq/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-sfcn1usm/install-record.txt --single-version-externally-managed --compile --install-headers /private/var/root/env/include/site/python3.7/majiq" failed with error code 1 in /private/tmp/pip-install-8vjv35m9/majiq/
【问题讨论】:
标签: gcc installation clang