ImportError: numpy.core.multiarray failed to import (import pyBigWig)

 

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

 
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[5], line 18
     16 import pybedtools
     17 from pybedtools import featurefuncs
---> 18 import pyBigWig

ImportError: numpy.core.multiarray failed to import



 

解决方法:

这个错误是由于numpy版本与某个库文件包,比如opencv-python版本不匹配造成的

系统原来不要有numpy这个包!!!如果你已经安装了,请先卸载numpy包,再安装opencv-python包

新建了一个文件夹,将文件移动过去了,

查看numpy 版本:pip show numpy

 

(base) [ibiomed H3K9ac]# conda activate mydlenv
您在 /var/spool/mail/root 中有邮件
(mydlenv) [ibiomed H3K9ac]# pip show numpy
Name: numpy
Version: 1.19.2

pip show pyBigWig
Name: pyBigWig
Version: 0.3.18

pip uninstall numpy

pip uninstall pyBigWig

pip install pyBigWig

  Downloading pyBigWig-0.3.22-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (196 kB)

 pip install -U numpy==1.20.0

 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pandas 1.5.3 requires numpy>=1.20.3; python_version < "3.10", but you have numpy 1.20.0 which is incompatible.

pip uninstall numpy

pip install -U numpy==1.20.3

 

 

 REF

https://blog.csdn.net/Gherbirthday0916/article/details/124068925

https://blog.csdn.net/Robin_Pi/article/details/120544691

https://blog.csdn.net/CT_WJ/article/details/94602681

 

posted @   emanlee  阅读(652)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2022-05-03 RuntimeError: Numpy is not available _tensor.py
2022-05-03 ImportError: cannot import name 'LightningEnum' from 'pytorch_lightning.utilities'
2022-05-03 Jupyter Notebook 琐碎知识点
点击右上角即可分享
微信分享提示