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

powerline #850

Closed
atrauzzi opened this issue Mar 27, 2014 · 21 comments
Closed

powerline #850

atrauzzi opened this issue Mar 27, 2014 · 21 comments

Comments

@atrauzzi
Copy link

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
@ZyX-I
Copy link
Contributor

ZyX-I commented Mar 27, 2014

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

@ZyX-I
Copy link
Contributor

ZyX-I commented Mar 27, 2014

This is usually $HOME/.local/bin.

@atrauzzi
Copy link
Author

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?

@ZyX-I
Copy link
Contributor

ZyX-I commented Mar 27, 2014

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.

@atrauzzi
Copy link
Author

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

@ZyX-I
Copy link
Contributor

ZyX-I commented Mar 27, 2014

Can you actually check it?

27.03.14, 21:03, "Alexander Trauzzi" notifications@github.com":

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

@ZyX-I ZyX-I added bug labels Mar 27, 2014
@atrauzzi
Copy link
Author

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.

@atrauzzi
Copy link
Author

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?

@atrauzzi
Copy link
Author

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.

@ZyX-I
Copy link
Contributor

ZyX-I commented Mar 28, 2014

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" notifications@github.com":

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

@ZyX-I ZyX-I closed this as completed Mar 28, 2014
@atrauzzi
Copy link
Author

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
Copy link
Author

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:~$ 

@ZyX-I
Copy link
Contributor

ZyX-I commented Mar 28, 2014

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" notifications@github.com":

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

@tomleo
Copy link

tomleo commented Jan 15, 2015

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

@Goddard
Copy link

Goddard commented Aug 21, 2015

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

@jakies
Copy link

jakies commented Sep 3, 2015

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

@vrkansagara
Copy link

@jakies it's work for me. on

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

@justn6
Copy link

justn6 commented Feb 18, 2016

Was having same issue, works for me

@saintplay
Copy link

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)

@butonly
Copy link

butonly commented Oct 12, 2016

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

@vrkansagara
Copy link

hum!

wataash added a commit to wataash/powerline that referenced this issue Sep 5, 2017
wataash added a commit to wataash/powerline that referenced this issue Sep 5, 2017
wataash added a commit to wataash/powerline that referenced this issue Sep 5, 2017
wataash added a commit to wataash/powerline that referenced this issue Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants