conda cnvkit安装中解决报错

cnvkit安装

# 安装
conda install cnvkit
# 调用软件
cnvkit.py -h
# 如果调用成功,证明成功安装

cnvkit安装报错

$ cnvkit.py -h
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
  File "/home/vip14/miniconda2/envs/rna/bin/cnvkit.py", line 8, in 
    from cnvlib import commands
  File "/home/vip14/miniconda2/envs/rna/lib/python2.7/site-packages/cnvlib/__init__.py", line 5, in 
    from .commands import *
  File "/home/vip14/miniconda2/envs/rna/lib/python2.7/site-packages/cnvlib/commands.py", line 18, in 
    from matplotlib import pyplot
  File "/home/vip14/miniconda2/envs/rna/lib/python2.7/site-packages/matplotlib/pyplot.py", line 31, in 
    import matplotlib.colorbar
  File "/home/vip14/miniconda2/envs/rna/lib/python2.7/site-packages/matplotlib/colorbar.py", line 36, in 
    import matplotlib.contour as contour
  File "/home/vip14/miniconda2/envs/rna/lib/python2.7/site-packages/matplotlib/contour.py", line 14, in 
    import matplotlib._contour as _contour
ImportError: numpy.core.multiarray failed to import

解决方法

重新安装numpy,不用卸载

# source activate rna 激活环境
rm -r  ~/miniconda2/envs/rna/lib/python2.7/site-packages/numpy/
rm  ~/miniconda2/envs/rna/lib/python2.7/site-packages/numpy-1.9.3-py2.7.egg-info
pip install numpy
cnvkit.py -h
# 即可解决numpy安装调取失败问题

你可能感兴趣的:(conda cnvkit安装中解决报错)