powerline

Created on 27 Mar 2014  ·  21Comments  ·  Source: powerline/powerline

I'm getting the following message when trying to configure Powerline with Bash on Ubuntu 13.10:

bash: /home/ME/.local/lib/python2.7/site-packages/powerline/bindings/bash/../../../scripts/powerline: No such file or directory
cshell invalid bug

Most helpful comment

Here's what I did to get things working on Ubuntu 15, using pip installation.

jake$ which powerline-config
~/.local/bin/powerline-config

Then, in my ~/.bashrc

export PATH="$HOME/.local/bin:$PATH"
export POWERLINE_COMMAND=powerline
export POWERLINE_CONFIG_COMMAND=powerline-config
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. ~/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh

All 21 comments

If you install via pip you must add the place where pip puts scripts to $PATH.

This is usually $HOME/.local/bin.

Currently my path is as follows:

~/.local/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Seems to still be giving me the error from above. Is it because it's trying to reference the script via a direct path that doesn't exist?

Are you sure this is $PATH _at the point where powerline script is sourced_? If "which powerline" is able to find powerline script everything should work.

I've set it in my ~/.profile file. So when I start a new terminal, it should be set... but still no luck.

Can you actually check it?

27.03.14, 21:03, "Alexander Trauzzi" [email protected]":

I've set it in my ~/.profile file. So when I start a new terminal, it should be set...

Reply to this email directly or view it on GitHub.

Sent from Yandex.Mail for mobile: http://m.ya.ru/ymail

When I open a new terminal and type echo $PATH, I'm given:

~/.local/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Also, powerline definitely runs the tool.

Additionally, if I just manually source the powerline bash config for my individual terminal session, I get:

bash: /home/atrauzzi/.local/lib/python2.7/site-packages/powerline/bindings/bash/../../../scripts/powerline: No such file or directory

Still seems like it's trying to find the powerline command somewhere that it isn't.

** Is it because which isn't returning the location of my home-dir installed copy of powerline?

And sorry for the spam, I just put:

export POWERLINE_COMMAND=powerline

...right after the detection to override it to the normal command. Seems to work. It looks like which is not an accurate way of detecting home-dir installations. At least on ubuntu.

I do not see a reason for which not to work. More likely PATH setting is modified after sourcing.

28.03.14, 15:14, "Alexander Trauzzi" [email protected]":

And sorry for the spam, I just put:export POWERLINE_COMMAND=powerline
...right after the detection to override it to the normal command. Seems to work. It looks like which is not an accurate way of detecting home-dir installations. At least on ubuntu.

Reply to this email directly or view it on GitHub.

Sent from Yandex.Mail for mobile: http://m.ya.ru/ymail

As I mentioned. In a terminal where I can run the powerline command, which doesn't tell me where the executable is. So the problem is that your detection isn't working properly.

atrauzzi@Epsilon:~$ echo $PATH
~/.local/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
atrauzzi@Epsilon:~$ powerline
usage: powerline [-h] [-r MODULE] [-w WIDTH] [--last_exit_code INT]
                 [--last_pipe_status LIST] [--jobnum INT] [-c KEY.KEY=VALUE]
                 [-t THEME.KEY.KEY=VALUE] [-p PATH] [-R KEY=VAL]
                 ext [{left,right}]
powerline: error: too few arguments
atrauzzi@Epsilon:~$ which powerline
atrauzzi@Epsilon:~$ which ls
/bin/ls
atrauzzi@Epsilon:~$ 

Tilde character must not be in $PATH. Of course detection does not work: according to the standard it has no special meaning, tilde expansion is a shell feature. Though I thought which is built-in (in zsh it is) and uses the exact same code to find executable as shell does.

28.03.14, 15:30, "Alexander Trauzzi" [email protected]":

atrauzzi@Epsilon:~$ echo $PATH~/.local/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/gamesatrauzzi@Epsilon:~$ powerlineusage: powerline [-h] [-r MODULE] [-w WIDTH] [--last_exit_code INT] [--last_pipe_status LIST] [--jobnum INT] [-c KEY.KEY=VALUE] [-t THEME.KEY.KEY=VALUE] [-p PATH] [-R KEY=VAL] ext [{left,right}]powerline: error: too few argumentsatrauzzi@Epsilon:~$ which powerlineatrauzzi@Epsilon:~$ which ls/bin/lsatrauzzi@Epsilon:~$

Reply to this email directly or view it on GitHub.

Sent from Yandex.Mail for mobile: http://m.ya.ru/ymail

I had the same issue this is how I was able to get things working.

In ~/.bashrc

if [ -d "$HOME/.local/bin" ]; then
    PATH="$HOME/.local/bin:$PATH"
fi
export POWERLINE_COMMAND=powerline

Hope that might help.

System Info cat /etc/*release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.10
DISTRIB_CODENAME=utopic
DISTRIB_DESCRIPTION="Ubuntu 14.10"
NAME="Ubuntu"
VERSION="14.10 (Utopic Unicorn)"

Having this same error in Ubuntu 15.10

Although none of the solutions above fixed this issue.

which powerline returns
/home/goddard/.local/bin/powerline

I tried going to this directory, but it doesn't exist
/home/goddard/.local/lib/python2.7/site-packages/powerline/bindings/bash/../../../scripts

Here's what I did to get things working on Ubuntu 15, using pip installation.

jake$ which powerline-config
~/.local/bin/powerline-config

Then, in my ~/.bashrc

export PATH="$HOME/.local/bin:$PATH"
export POWERLINE_COMMAND=powerline
export POWERLINE_CONFIG_COMMAND=powerline-config
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. ~/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh

@jakies it's work for me. on

Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

Was having same issue, works for me

Thanks

if [ -d "$HOME/.local/bin" ]; then
    PATH="$HOME/.local/bin:$PATH"
fi
export POWERLINE_COMMAND=powerline

On my .bashrc works on my Bash On Windows (Ubuntu)

It doesn't work when install by pip

pip install powerline-status

But work after

sudo apt install powerline

Fixed on Ubuntu 16.04.1 LTS

hum!

Was this page helpful?
0 / 5 - 0 ratings