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

specify virtualenv injection during pipx run #1587

Open
charles-cooper opened this issue Dec 15, 2024 · 0 comments
Open

specify virtualenv injection during pipx run #1587

charles-cooper opened this issue Dec 15, 2024 · 0 comments

Comments

@charles-cooper
Copy link

How would this feature be useful?

pipx run runs binaries in an isolated virtualenv. however, it would be useful sometimes to be able to include other directories in the sys path (e.g. an active virtualenv). for standalone tools (e.g. installed with pipx install) you can inject packages into the tool's virtualenv, but it would be helpful to be able to do this dynamically.

Describe the solution you'd like

at least one of the two following additions to pipx run:

  • allow PYTHONPATH env variable to be propagated to the binary
  • add a --sys-path CLI flag which specifies additional sys paths to add to the binary's sys path.

Describe alternatives you've considered

the PYTHONPATH method could also work for standalone binaries. although the use case there is similar to just installing via pip, the difference between doing is this way and just using pip install is that pip install can pollute your global site packages, whereas this method could dynamically update sys path based on environment

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

1 participant