-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
force recreation of venv if it is not sane (#286) #1797
force recreation of venv if it is not sane (#286) #1797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might go into a loop here since there is no guarantee that recreating the virtual environment will fix the issue. If we go this route we should at least display a warning that we recreate the environment because it's invalid.
Another approach, or an addition to this PR, could be to check if the environment is valid after creating it and, if it's not, we could warn the user. A lot of cases we had here comes from the fact that Debian-based systems do not include the venv
module by default which leads to a broken environment. If it's only pip missing, we could try to install it by using the get-pip.py
script.
I've added a more explicit warning. I also have a variant in preparation where I check the sanity of the venv after creating this. But I have a problem to pass the tests in |
Co-Authored-By: Sébastien Eustace <sebastien.eustace@gmail.com>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
With this PR a virtual environment is recreated if it's not sane, meaning the python and pip executable is not found within the venv path.
I'm not sure how to write a test for it. If it's necessary, please give me a hint :)
Fixes: #286
Pull Request Check List
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!