Closed beechwood13 closed 5 years ago
Facing the same issue in RHEL 7.
Same issue here
Same issue. Any news?
Currently, vcf-kit only works with Python 2.7
How do you change what version of python you're running vcf-kit through?
@mayasheth Check out pyenv and pyenv-virtualenv. You can use them to set up python on a per-directory basis.
I just ran into this issue on CentOS 7 as well. I tried with the system's Python 2.7.5, Python 3.4.9, and a custom Python 2.7.13 virtual environment.
In both Python 2 environments vk
fails with:
$ vk
Traceback (most recent call last):
File "/tmp/vcfkit/bin/vk", line 6, in <module>
from vcfkit.vk import main
File "/tmp/vcfkit/lib/python2.7/site-packages/vcfkit/vk.py", line 27, in <module>
from utils.vcf import *
File "/tmp/vcfkit/lib/python2.7/site-packages/vcfkit/utils/vcf.py", line 10, in <module>
np.set_printoptions(threshold=np.nan)
File "/tmp/vcfkit/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 246, in set_printoptions
floatmode, legacy)
File "/tmp/vcfkit/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 93, in _make_options_dict
raise ValueError("threshold must be numeric and non-NAN, try "
ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation
On Python 3.4 it fails with:
$ vk
Traceback (most recent call last):
File "/tmp/vcfkit-python3/bin/vk", line 11, in <module>
load_entry_point('VCF-kit==0.1.6', 'console_scripts', 'vk')()
File "/tmp/vcfkit-python3/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/tmp/vcfkit-python3/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
return ep.load()
File "/tmp/vcfkit-python3/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 2346, in load
return self.resolve()
File "/tmp/vcfkit-python3/lib64/python3.4/site-packages/pkg_resources/__init__.py", line 2352, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/tmp/vcfkit-python3/lib64/python3.4/site-packages/vcfkit/vk.py", line 24, in <module>
from utils import lev, message
ImportError: No module named 'utils'
What is the correct Python to run VCF-Kit with? Can you please add some notice to the README.md to guide us? Thanks!
I'm in the exact same situation as @alanorth. Any suggestions how to get it running?
@alanorth @chromatimera It isn't compatible with Python3 currently.
I'm think there must be some sort of incompatibility with an update to numpy. I'm a bit stretched on time right now, but I would like to find a solution in the near future.
A quick workaround would be to use conda or docker.
Please see: https://bioconda.github.io/recipes/vcfkit/README.html
Which also lists an available docker container:
docker pull quay.io/repository/biocontainers/vcfkit
Hi @danielecook ! I was using VCF-kit over the last few days and after a conda update it is now giving an error as below:
Traceback (most recent call last): File "/home/ofelia/anaconda2/bin/vk", line 7, in <module> from vcfkit.vk import main File "/home/ofelia/anaconda2/lib/python2.7/site-packages/vcfkit/vk.py", line 27, in <module> from utils.vcf import * File "/home/ofelia/anaconda2/lib/python2.7/site-packages/vcfkit/utils/vcf.py", line 10, in <module> np.set_printoptions(threshold=np.nan) File "/home/ofelia/anaconda2/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 246, in set_printoptions floatmode, legacy) File "/home/ofelia/anaconda2/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 93, in _make_options_dict raise ValueError("threshold must be numeric and non-NAN, try " ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation
Same goes for trying to access it with docker:
Traceback (most recent call last): File "/home/ofelia/anaconda2/bin/vk", line 7, in <module> from vcfkit.vk import main File "/home/ofelia/anaconda2/lib/python2.7/site-packages/vcfkit/vk.py", line 27, in <module> from utils.vcf import * File "/home/ofelia/anaconda2/lib/python2.7/site-packages/vcfkit/utils/vcf.py", line 10, in <module> np.set_printoptions(threshold=np.nan) File "/home/ofelia/anaconda2/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 246, in set_printoptions floatmode, legacy) File "/home/ofelia/anaconda2/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 93, in _make_options_dict raise ValueError("threshold must be numeric and non-NAN, try " ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation
Is there any way I can downgrade the numpy package in order to make it work? I would really appreciate some help!
If anyone is still trying to make VCF-kit work. It works on python 2.7.10 and gcc/4.7.2
Hi, Installation VCF-kit using pip went smoothly and it looked that I had all dependencies installed. However, if I start any of the vk commands, I get the following error:
File "/usr/bin/vk", line 7, in
from vcfkit.vk import main
File "/usr/lib/python3.4/site-packages/vcfkit/vk.py", line 24, in
from utils import lev, message
ImportError: cannot import name 'lev'
utils==0.9.0 is installed
Thanks for your help in advance !