From 0388da7d0b42574e08cbe82aed7de711ae4b116f Mon Sep 17 00:00:00 2001 From: native-api Date: Mon, 25 Oct 2021 01:08:57 +0300 Subject: [PATCH] Add setup instructions for the case when one installs Pyenv as part of a batch job (#2127) --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dee783c..06a978b4 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ easy to fork and contribute any changes back upstream. In MacOS, make sure that your terminal app runs the shell as a login shell. - - **Temporary environments (CI, batch jobs):** + - **Temporary environments (CI, Docker, batch jobs):** In CI/build environments, paths and the environment are usually already set up for you in one of the above ways. @@ -323,6 +323,18 @@ easy to fork and contribute any changes back upstream. echo 'eval "$(pyenv init -)"' ~~~ + If you are installing Pyenv yourself as part of the batch job, + after installing the files, run the following in the job's shell + to be able to use it. + + ~~~bash + export PYENV_ROOT="$HOME/.pyenv" + export PATH="$PYENV_ROOT/bin:$PATH" # if `pyenv` is not already on PATH + eval "$(pyenv init --path)" + eval "$(pyenv init -)" + ~~~ + + **General Bash warning**: There are some systems where the `BASH_ENV` variable is configured to point to `.bashrc`. On such systems, you should almost certainly put the `eval "$(pyenv init -)"` line into `.bash_profile`, and **not** into `.bashrc`. Otherwise, you