question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When using --use-feature=2020-resolver - Pip fails installing some packages from site-packages in virtualenv

See original GitHub issue

Hi, I tried looking for a similar issue but I couldn’t find anything, although this issue is related with #8731

Environment

pip version: 20.2.4 Python version:3.7 OS: any Dockerfile that illustrates this issue:

FROM python:3.7
RUN pip install virtualenv requests argparse==1.4.0
RUN /usr/local/bin/virtualenv --system-site-packages tst
RUN /tst/bin/pip3.7 install --upgrade pip==20.2.4 && /tst/bin/pip3.7 install  --use-feature=2020-resolver --proxy 127.0.0.1 --retries 0 --timeout 1 argparse==1.4.0

Description When trying to install some packages like argparse the installation is failing if there is no connection to a remote repo that contains that package.

Using the same example from #8731, the issue seems to be happening only with some packages like argparse and not with requests for example.

Expected behavior Pip installs argparse correctly in the virtualenv in the above example.

Output

ERROR: Could not find a version that satisfies the requirement argparse==1.4.0
ERROR: No matching distribution found for argparse==1.4.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Oct 22, 2020

@pfmoore @uranusjr I think it’s OK to call this a downstream issue. If you think so too, I think @uranusjr’s PR covers this TBH.

0reactions
pradyunsgcommented, Sep 20, 2021

Closing this seems to be resolved. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip won't install packages in virtualenv
Im using python3.7 on manjaro linux with the newest kernel. In my envs and on my system pip 19.2.3 is installed. The error...
Read more >
User Guide - pip documentation v22.3.1
In a --system-site-packages virtualenv, pip will not install a package that conflicts with a package in the virtualenv site-packages.
Read more >
Installing packages using pip and virtual environments
This guide discusses how to install packages using pip and a virtual environment manager: either venv for Python 3 or virtualenv for Python...
Read more >
Python Virtual Environments: A Primer
This command is the default command that you should use to install external Python packages with pip . Because you first created and...
Read more >
Installing Python Packages with pip and virtualenv / venv
https://dbader.org/python-dependency-pitfalls ▻ Take a free 5-day Python class on Dependency Management & PackagingWhen you install Python ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found