问题
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
- 39 ImportError cannot Reader import39 importerror cannot reader 39 importerror cannot import importerror-cannot-import-name-un importerror pykeyboard cannot import selenium import 39 importerror importerror-cannot-import-name-un known-location 39 importerror parse_xml cannot importerror importing模块greenlet importerror importing模块qtchart opengl 39 importerror library