-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Docs for custom Python environment interference. #4185
Conversation
Documenting an edge case where a user's Python environment might interfere with the correct setup stages. See [this issue report](#4143) for more details.
@kierun can you explain in more detail what sort of problems arose for you with a custom PYTHONPATH? Ideally we should fix or detect those problems in certbot-auto. |
Whoops. I didn't mean to assign this PR to Peter. Also, the reason for this PR was explained in #4143. |
Custom Python environment | ||
^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Note that if you have configured any custom Python environment variables on your system, make sure they are properly (un)set when running `certbot-auto` and `sudo`. This could happen if you run `sudo zsh` as your user's `PYTHONPATH` will be preserved which might cause problems. |
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.
It might be nice to link to make "Python environment variables" link to https://docs.python.org/2/using/cmdline.html#environment-variables. You can do this like:
...custom `Python environment variables <https://docs.python.org/2/using/cmdline.html#environment-variables>`_ on..
Also, please correct me if I'm wrong, but I don't think it's the default behavior of either sudo
or zsh
to preserve environment variables like PYTHONPATH
. If this is the case, I'd remove the second sentence entirely. You can add "(such as PYTHONPATH
)" to the first sentence if you want to bring more attention to this variable.
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.
In general descendant processes inherit the environment of their parent. If you run sudo su
, you get a login shell that clears the environment and loads root's default environment (through the various mechanisms that do so). However, if you run sudo bash
or sudo zsh
, most of the environment gets kept (though this may differ depending on sudo permissions).
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.
@bmw Your changes are fine. However, you can set up virtual environments to link to all the system wide libraries as well. It is not the default, but it is possible.
What happens next? |
Let's do a little more investigation at #4143 so we can be sure the warning we put in the docs, if any, is very specific. |
Documenting an edge case where a user's Python environment might interfere with the correct setup stages. See this issue report for more details.