美文网首页
pip安装PyVCF后有问题:ImportError: cann

pip安装PyVCF后有问题:ImportError: cann

作者: 生物信息与育种 | 来源:发表于2023-09-27 23:01 被阅读0次

    问题

    Python通过pip安装PyVCF成功,但运行脚本时出现问题:

    File "/home/theo/anaconda3/lib/python3.9/site-packages/vcftoolz/vcftoolz.py", line 19, in <module>
        import vcf
      File "/home/theo/anaconda3/lib/python3.9/site-packages/vcf/__init__.py", line 166, in <module>
        from parser import Reader, Writer
    ImportError: cannot import name 'Reader' from 'parser' (/home/theo/anaconda3/lib/python3.9/lib-dynload/parser.cpython-39-x86_64-linux-gnu.so)
    

    解决

    使用conda重新安装:

    conda install --channel "conda-forge" pyvcf
    

    Ref:https://github.com/CFSAN-Biostatistics/vcftoolz/issues/9

    相关文章

      网友评论

          本文标题:pip安装PyVCF后有问题:ImportError: cann

          本文链接:https://www.haomeiwen.com/subject/cqflbdtx.html