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

error in PyVCF setup command: use_2to3 is invalid #334

Open
MingchenInSZ opened this issue Nov 4, 2021 · 11 comments
Open

error in PyVCF setup command: use_2to3 is invalid #334

MingchenInSZ opened this issue Nov 4, 2021 · 11 comments

Comments

@MingchenInSZ
Copy link

when i run command as :
$ pip3 install PyVCF==0.6.8
Collecting PyVCF==0.6.8
Using cached PyVCF-0.6.8.tar.gz (34 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /data/b01/user/chenming/prog/installed/python3.6/bin/python3.6 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a038wp5_/pyvcf_e119330b1d0c4c109a16e1b494de7db1/setup.py'"'"'; file='"'"'/tmp/pip-install-a038wp5_/pyvcf_e119330b1d0c4c109a16e1b494de7db1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0mlgtl_c
cwd: /tmp/pip-install-a038wp5_/pyvcf_e119330b1d0c4c109a16e1b494de7db1/
Complete output (1 lines):
error in PyVCF setup command: use_2to3 is invalid.

WARNING: Discarding https://files.pythonhosted.org/packages/20/b6/36bfb1760f6983788d916096193fc14c83cce512c7787c93380e09458c09/PyVCF-0.6.8.tar.gz#sha256=e9d872513d179d229ab61da47a33f42726e9613784d1cb2bac3f8e2642f6f9d9 (from https://pypi.org/simple/pyvcf/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyVCF==0.6.8 (from versions: 0.6.8.linux-x86_64, 0.0.0, 0.1, 0.2, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8)
ERROR: No matching distribution found for PyVCF==0.6.8

@ChrisMoth
Copy link

I hit this as well.
I just installed the (new) November 2021 Anaconda release on linux-64bit (CentOS 7) and hit this issue as well when I attempted
$ pip install PyVCF

I can't imagine why PyVCF is support Python2 in 2021. I would recommend dropping that, if that is the issue.

Setuptools, understandably since Version 58.0.0, has dropped support for 2to3 (if I am reading my google correctly)

On latest Anaconda distro, we are at 58.0.4

$ python
Python 3.9.7 (default, Sep 16 2021, 13:09:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

import setuptools
setuptools.version
'58.0.4'

I will also file a ticket at Anaconda.

@ChrisMoth
Copy link

It seems fairly trivial to manually run 2to3 inside the new Anaconda environment and update the PyCVF *.py files... in a hard-coded directory. But yes, it would be preferable to have PyVCF maintained as a Python3 library, and integrated into the "pip" approach.

@dridk
Copy link

dridk commented Jan 13, 2022

I think it is urgent to fix this issue. Someone to contact the author to take over the project?

@ChrisMoth
Copy link

Many have tried to contact the author, apparently. I had no problems just adding the few source files to my own development work, after running 2to3 and adjusting a few lines of code. I don't have time to "maintain a new repo" - but it should be a trivial task for someone with a little bit of bandwidth.

@dridk
Copy link

dridk commented Jan 13, 2022

So, let's fork the repository and create PyVCF2 ?

@dridk
Copy link

dridk commented Jan 13, 2022

By the way, could you detail how you fix with use_2to3 ?

@ChrisMoth
Copy link

It is a command line tool that takes python2 source files as input, and returns python3 files.... that are mostly ready for python3.

https://stackoverflow.com/questions/20458011/how-to-use-2to3-properly-for-python

At this moment, my web server is down, but please remind me on Monday, and I'll post the library that I created using 2to3 as a downloaded .tar file. I don't have time to be responsible for all the python platform integrations around the planet, but the conversion process to get everything working again was very little work.

@esavage111
Copy link

Hey @ChrisMoth I am running into the exact same issue, did you end up posting the library you created using 2to3?

@dridk
Copy link

dridk commented Feb 11, 2022

check pyvcf3

@ChrisMoth
Copy link

ChrisMoth commented Feb 11, 2022 via email

@jannis-baum
Copy link

In case someone else really needs to use PyVCF from here, you can get the install to work on Python 3.10 with the following:

pip install pip==23 setuptools==57
pip install pyvcf

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

5 participants