Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import PyVCF in Python 3.5 after successful installation by pip #316

Open
nkuyfq opened this issue Jul 5, 2019 · 1 comment
Open

Comments

@nkuyfq
Copy link

nkuyfq commented Jul 5, 2019

I used pip (pip 19.1.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)) to install PyVCF in Ubuntu 16.04 and it succeeded. However, when I imported this module in Python 3.5, it failed. Why? I checked the system path like /usr/local/lib/python3.5/dist-packages, and I could see two directories: PyVCF-0.6.8.dist-info and vcf. Similarly, I installed scipy by using pip, and I was able to import this module in Python 3.5

I have pasted the message from the terminal here:

nkuyfq@nkuyfq-VirtualBox:/opt$ sudo pip install PyVCF
WARNING: The directory '/home/nkuyfq/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/nkuyfq/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting PyVCF
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from PyVCF) (20.7.0)
Installing collected packages: PyVCF
Successfully installed PyVCF-0.6.8

nkuyfq@nkuyfq-VirtualBox:/opt$ python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

import PyVCF
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'PyVCF'

@hezscha
Copy link

hezscha commented May 18, 2020

It worked for me on python 3.7. Try:
import vcf
And see if these examples work: https://pyvcf.readthedocs.io/en/latest/INTRO.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants