mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 17:23:37 +00:00
Add setup instructions for the case when one installs Pyenv as part of a batch job (#2127)
This commit is contained in:
parent
13efdea9ab
commit
0388da7d0b
1 changed files with 13 additions and 1 deletions
14
README.md
14
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
|
||||
|
|
Loading…
Reference in a new issue