-
Notifications
You must be signed in to change notification settings - Fork 414
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
PATH not extended within virtualenv #1024
Comments
This works for
Probably we need to apply this behaviour to |
Ah, it sounds like adding In my toy example from above, I would not expect Seems to me that making |
Note that PEP 405 does not require virtual environment activation to add the script directory to PATH. I would say programs relying on the behaviour are designed suboptimally and should be updated. |
Oh, that seems odd to me. What is the "optimal" implementation in your opinion here? |
Depending on how you want the user to set up the dependency, either use |
This comment was marked as spam.
This comment was marked as spam.
|
Describe the bug
If some python running within pipx attempts to run an executable that's provided by one of its dependencies that is installed within the pipx virtualenv, it fails. I believe this is because the
PATH
environment variable is not extended with thebin
directory of the virtualenv.How to reproduce
Here's a simple package that runs an executable provided by one of its dependencies:
demo.py
setup.cfg
Build and run with:
Result:
Expected behavior
By the time
main
function indemo.py
is called, thePATH
environment variable should contain thebin
directory of the virtualenv. So we should see:Workaround
A workaround we're currently using is to invoke the target python binary using
sys.executable
. It's not ideal, as it means that the package needs to be explicitly modified to run in pipx.The text was updated successfully, but these errors were encountered: