PyVCF icon indicating copy to clipboard operation
PyVCF copied to clipboard

error in PyVCF setup command: use_2to3 is invalid

Open MingchenInSZ opened this issue 4 years ago • 13 comments

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

MingchenInSZ avatar Nov 04 '21 02:11 MingchenInSZ

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 avatar Dec 08 '21 18:12 ChrisMoth

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.

ChrisMoth avatar Dec 08 '21 19:12 ChrisMoth

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

dridk avatar Jan 13 '22 10:01 dridk

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.

ChrisMoth avatar Jan 13 '22 13:01 ChrisMoth

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

dridk avatar Jan 13 '22 21:01 dridk

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

dridk avatar Jan 13 '22 21:01 dridk

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.

ChrisMoth avatar Jan 13 '22 23:01 ChrisMoth

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

esavage111 avatar Feb 11 '22 16:02 esavage111

check pyvcf3

dridk avatar Feb 11 '22 16:02 dridk

For me, I only needed this much of the library - here is what I am using now under Python 3.9 - latest Anaconda release

https://github.com/CapraLab/pdbmap/tree/master/vcf [https://opengraph.githubassets.com/c8bd1dfe09781d6b672067c7175c2ccab4fe27d95330a8f466b5e70f906214f3/CapraLab/pdbmap]https://github.com/CapraLab/pdbmap/tree/master/vcf pdbmap/vcf at master · CapraLab/pdbmaphttps://github.com/CapraLab/pdbmap/tree/master/vcf Contribute to CapraLab/pdbmap development by creating an account on GitHub. github.com I believe this "pdbmap" library is public, and you can grab the needed vcf directory and 5 or so .py files easily.


From: esavage111 @.> Sent: Friday, February 11, 2022 10:44 AM To: jamescasbon/PyVCF @.> Cc: Moth, Christopher W @.>; Mention @.> Subject: Re: [jamescasbon/PyVCF] error in PyVCF setup command: use_2to3 is invalid (Issue #334)

Hey @ChrisMothhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FChrisMoth&data=04%7C01%7Cchris.moth%40vanderbilt.edu%7C0d99b2319f834fb7ccb308d9ed7dc3d6%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637801946691924256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CZ%2By%2F%2FttZ1zbMVDhbirsXRfE7j0xC3W7Sj%2FamXPIGC8%3D&reserved=0 I am running into the exact same issue, did you end up posting the library you created using 2to3?

— Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjamescasbon%2FPyVCF%2Fissues%2F334%23issuecomment-1036403138&data=04%7C01%7Cchris.moth%40vanderbilt.edu%7C0d99b2319f834fb7ccb308d9ed7dc3d6%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637801946691924256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=f8uWIiLBT9ykE6r5vmKwkcGuWQKagPFCPIz1LIFF%2BTU%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHMA5AHFPIVW55HHRDBONKTU2U4GTANCNFSM5HKLZPVA&data=04%7C01%7Cchris.moth%40vanderbilt.edu%7C0d99b2319f834fb7ccb308d9ed7dc3d6%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637801946691924256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yov56%2BBaZ7EKQ3xbsaJTqXtx8dlwRBjp4BYvaM9L4KA%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cchris.moth%40vanderbilt.edu%7C0d99b2319f834fb7ccb308d9ed7dc3d6%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637801946691924256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uB9t2bVjszXhXPx6p9VXLrcNkAQzihymM6o3wGYLR8E%3D&reserved=0 or Androidhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cchris.moth%40vanderbilt.edu%7C0d99b2319f834fb7ccb308d9ed7dc3d6%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637801946691924256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FozyYW7ewpoRcSWvWU2lVJJ6mYDmbfmSkyyQu3W%2Fhl8%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

ChrisMoth avatar Feb 11 '22 18:02 ChrisMoth

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

jannis-baum avatar Aug 17 '24 09:08 jannis-baum