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

Docs for custom Python environment interference. #4185

Closed
wants to merge 1 commit into from
Closed

Docs for custom Python environment interference. #4185

wants to merge 1 commit into from

Conversation

kierun
Copy link

@kierun kierun commented Feb 8, 2017

Documenting an edge case where a user's Python environment might interfere with the correct setup stages. See this issue report for more details.

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.
@bmw
Copy link
Member

bmw commented Feb 25, 2017

@pde, you were looking into code/documentation changes around low memory problems with certbot-auto with PRs like #2370 and #3473. Are you still working on this or would you like Noah or I to take over?

@bmw bmw assigned pde Feb 25, 2017
@jsha
Copy link
Contributor

jsha commented Mar 7, 2017

@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.

@bmw
Copy link
Member

bmw commented Mar 7, 2017

Whoops. I didn't mean to assign this PR to Peter. Also, the reason for this PR was explained in #4143.

@bmw bmw unassigned pde Mar 7, 2017
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.
Copy link
Member

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.

Copy link
Contributor

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).

Copy link
Author

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.

@kierun
Copy link
Author

kierun commented Mar 7, 2017

What happens next?

@jsha
Copy link
Contributor

jsha commented Mar 7, 2017

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.

@jsha
Copy link
Contributor

jsha commented Mar 9, 2017

Closing per discussion in #4143. Thanks so much for your help @kierun, and let us know if you run into any more troubles!

@jsha jsha closed this Mar 9, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants