-
Notifications
You must be signed in to change notification settings - Fork 743
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
How to use powerline with pyenv-virtualenv? #358
Comments
(I mean apart from installing it in all my virtualenvs, which I've been doing in the meantime and works but is a bit of a pain) |
Admittedly I haven't worked with pyenv. So I'm going to have to learn about it a bit. So you used pip to install the project, correct? And what is the exact error you are getting? |
powerline-shell is installed in my system python (2.7.11) via pip I can pip install it into the current pyenv-virtualenv and my bash prompt works again Maybe I can add something in my |
I am not able to reproduce this issue. Could you perhaps provide all the commands necessary to reproduce? I uninstalled powerline-shell and then did the following:
|
I've had similar issue, solved it with this code
|
I had the exact same behavior as @anentropic (Hi Paul! Cracks me up every time I google an issue like this you've already posted an SO answer or GH issue 😂). After starting to use PyEnv myself on a new mac that I setup with powerline. @b-ryan's comment gave me an idea. I had installed powerline using the pyenv installed python and so there was a shim present at When I then activated my (pyenv) environment I no longer got the error. I believe it's because pyenv places it's shim folder in front of your Try removing powerline from the pyenv and installing it system wide first before activating. |
Hi @jaymzcd ! I haven't tried this yet but it sounds promising! |
@jaymzcd that makes sense. I wonder if the straightforward solution is to install with the system pip:
|
yes this totally worked for me deleted the pyenv shim version, then 👍 |
Excellent! I will put this in the FAQ. |
Unfortunately for some reason the shim is recreated every time the pyenv virtualenv is activated (also whenever you pip install/uninstall with the venv activated) I have not found a permanent solution yet see pyenv/pyenv#1112 |
@anentropic pyenv-which-ext should prevent pyenv shims giving you "command not found" errors when the shadowed program is installed on the system. |
I had to extend this commad with the |
You can also install commands that should be available outside venvs using pipx.
Make sure that your PATH contains This results in a new virtualenv created by pipx specifically for powerline-shell. It will also install a link this powerline-shell cli in |
Just a note for future readers - adding pipx's |
I upgraded from something very old to recent powerline
But now when I do
pyenv activate myenv
my prompt dies because powerline is not installed in the virtualenvIs there a workaround for this?
The text was updated successfully, but these errors were encountered: