4

I am trying to install a package using pip using the following command python -m pip install pysam pyvcf. But it gives the following error;

Requirement already satisfied: pysam in ./anaconda3/lib/python3.9/site-packages (0.21.0)
Collecting pyvcf
  Using cached PyVCF-0.6.8.tar.gz (34 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in PyVCF setup command: use_2to3 is invalid.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

When I search for the solutions, I found "pip install unroll": "python setup.py egg_info" failed with error code 1. It suggests to use pip install --upgrade setuptools; however this did not work. After updating setuptools, it keeps to giving the same error. How to solve this issue?

heyula
  • 113
  • 5
  • Does this answer your question? [Error while downloading the requirements using pip install (setup command: use\_2to3 is invalid.)](https://stackoverflow.com/questions/69100275/error-while-downloading-the-requirements-using-pip-install-setup-command-use-2) (Seems like you shouldn't upgrade setuptools, but rather downgrade it: it's a breaking change that took place after version 58, so you might want to revert to something earlier than that.) – Shay Jun 19 '23 at 20:58
  • I tried several versions including 57 and 58 but they gave the same error + ImportError: module 'setuptools.dist' has no attribute 'invalid_unless_false' [end of output] error. So actually that solution made it even worse – heyula Jun 19 '23 at 21:09
  • Interesting. Success rate with this solution in the various questions related to this specific error seems to be very high. I'd consider perhaps adding this bit of information to your question along with the new error text. – Shay Jun 19 '23 at 21:24

0 Answers0