Added tips to installation docs (#2175)

* Added virtual environment tips

Documented the use of `POWERLINE_COMMAND` env variable for improved performance with virtual environments.

* Clarify client versions

Adding details from the GitHub issues to clarify the installation docs.

* Added troubleshooting tip for Python environments
This commit is contained in:
Darren 2021-08-20 21:21:14 -05:00 committed by GitHub
parent 57aea1e400
commit 82c1373ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 5 deletions

View File

@ -16,9 +16,13 @@ Python package
brew install python brew install python
.. note:: .. note::
In case :file:`powerline.sh` as a client ``socat`` and ``coreutils`` need There are three variants of the powerline client. The fastest is
to be installed. ``coreutils`` may be installed using ``brew install written in C and will be compiled if the compiler and libraries are
coreutils``. detected during installation. The second fastest option is
:file:`powerline.sh` which requires ``socat`` and ``coreutils``.
``coreutils`` may be installed using ``brew install
coreutils``. If neither of these are viable, then Powerline will
utilize a fallback client written in Python.
2. Install Powerline using one of the following commands: 2. Install Powerline using one of the following commands:

View File

@ -193,8 +193,12 @@ I am suffering bad lags before displaying shell prompt
To get rid of these lags there currently are two options: To get rid of these lags there currently are two options:
* Run ``powerline-daemon``. Powerline does not automatically start it for you. * Run ``powerline-daemon``. Powerline does not automatically start it for you.
See installation instructions for more details.
* Compile and install ``libzpython`` module that lives in * Compile and install ``libzpython`` module that lives in
https://bitbucket.org/ZyX_I/zpython. This variant is zsh-specific. https://bitbucket.org/ZyX_I/zpython. This variant is zsh-specific.
* If you are a python package manager, be sure to set ``POWERLINE_COMMAND``
to your Powerline command. See installation instructions for details.
Prompt is spoiled after completing files in ksh Prompt is spoiled after completing files in ksh
----------------------------------------------- -----------------------------------------------

View File

@ -5,8 +5,9 @@ Shell prompts
************* *************
.. note:: .. note::
Powerline daemon is not run automatically by any of my bindings. It is Powerline can operate without a background daemon, but the shell performance
advised to add can be very slow. The Powerline daemon improves this performance
significantly, but must be started separately. It is advised to add
.. code-block:: bash .. code-block:: bash
@ -142,3 +143,19 @@ following in ``~/.profile``:
.. warning:: .. warning::
Busybox has two shells: ``ash`` and ``hush``. Second is known to segfault in Busybox has two shells: ``ash`` and ``hush``. Second is known to segfault in
busybox 1.22.1 when using :file:`powerline.sh` script. busybox 1.22.1 when using :file:`powerline.sh` script.
Python Virtual Environments (conda, pyenv)
==========================================
If your system uses virtual environments to manage different Python versions,
such as pyenv or anaconda, these tools will add a performance delay to every
shell prompt. This delay can be bypassed by explicitly specifying your command
path.
.. code-block:: bash
export POWERLINE_COMMAND={path_to_powerline}
where ``{path_to_powerline}`` is the full filepath for powerline. If you
installed Powerline within an environment, you can find this path for pyenv
with ``pyenv which powerline`` or for conda with ``which powerline``.