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.

Should installing pipx shared libs use `pip_args` from the latest package?

See original GitHub issue

Describe the bug

Currently when installing or upgrading the pipx shared libs, the functions _SharedLibs.upgrade() and _SharedLibs.create() accept pip_args arguments. https://github.com/pipxproject/pipx/blob/08bd15610bc406dabe8bf0db4adaba4a3a8b89ea/src/pipx/shared_libs.py#L33 https://github.com/pipxproject/pipx/blob/08bd15610bc406dabe8bf0db4adaba4a3a8b89ea/src/pipx/shared_libs.py#L61

They are used if a normal pipx install needs a shared library create/upgrade, and the pipx install pip args are used to also create the shared libs.

They are NOT used when creating/upgrading the shared libs during a pipx list or any access of an existing venv. (!!)

Recently this failed for me in the following situation: In a Python 3.6 test I was trying to install a package for the first time using the pip arguments --use-feature=2020-resolver. It caused pipx to fail with an error because before installing the package, it went to install the shared libs using pip argument --use-feature=2020-resolver. Since the original Python 3.6 pip doesn’t have that option, it couldn’t even upgrade pip in the first place and crashed.

I’m wondering if we should just remove pip_args from _SharedLibs.upgrade() and _SharedLibs.create(). It seems kind of arbitrary that only when upgrading the shared libs during a package install do they get the pip_args that happen to be used for that package, but not otherwise.

Is there a reason a user would need custom pip args to be used with the installation of the shared libs? If so, maybe we need a different more reliable mechanism.

How to reproduce

Expected behavior

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cs01commented, Nov 11, 2020

#shipit

1reaction
itsayellowcommented, Nov 11, 2020

I’m also kind of assuming that since we inconsistently apply pip_args (sometimes we don’t at all) that if were an issue for people it would’ve come up by now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should installing pipx shared libs use pip_args from the latest ...
Currently when installing or upgrading the pipx shared libs, the functions _SharedLibs.upgrade() and _SharedLibs.create() accept pip_args ...
Read more >
How pipx works
When installing a package and its binaries ( pipx install package ) pipx will. create directory ~/.local/pipx/venvs/PACKAGE; create or re-use a shared ......
Read more >
pipx · PyPI
This will install the package in an isolated, temporary directory and invoke the binary. Try it! pipx run cowsay moo. Notice that you...
Read more >
pipenv Documentation - Read the Docs
Strongly encourage the use of the latest versions of dependencies to ... Pipenv will install the excellent Requests library and create a Pipfile...
Read more >
Introduction | master | Documentation | Poetry - Python ...
Introduction Poetry is a tool for dependency management and packaging in Python. ... We provide a custom installer that will install Poetry in...
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