You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pyenv-virtualenv breaks fish shell when using pyenv global #80
I've been successfully using pyenv-virtualenv with fish, but using pyenv global breaks my shell: every new shell opens on an error traceback starting with:
pyenv-virtualenv: activate newdefault
fish: Could not locate end of block. The 'end' command is missing, misspelled or a ';' is missing.
/private/tmp/.psub.kRftWGHW9n (line 6): function _old_fish_prompt
^
in . (source) call of file '/private/tmp/.psub.d9D37vvhaa',
called on line 14 of file '/private/tmp/.psub.kRftWGHW9n',
in . (source) call of file '/Users/zeitgeist/.pyenv/versions/newdefault/bin/activate.fish',
called on line 14 of file '/private/tmp/.psub.kRftWGHW9n',
in . (source) call of file '-',
called on line 39 of file '/private/tmp/.psub.kRftWGHW9n',
in function 'pyenv',
called on line 19 of file '/private/tmp/.psub.HG02t3zPHZ',
with parameter list 'activate --no-error --verbose'
in function '_pyenv_virtualenv_hook',
called on standard input,
in event handler: handler for generic event 'fish_prompt'
function − function ‐ create a function
and ending with:
source: Error while reading file '/private/tmp/.psub.d9D37vvhaa'
fish: Unknown command '_old_fish_prompt'
/Users/username/.pyenv/versions/newdefault/bin/activate.fish (line 57): _old_fish_prompt
^
in command substitution
called on line 59 of file '/Users/username/.pyenv/versions/newdefault/bin/activate.fish',
in function 'fish_prompt',
called on standard input,
in command substitution
called on standard input,
Before using pyenv global, I had the same problem with shells inside Pycharm (no issue whith "regular" shells then).
Using bash then fish in the broken shell creates a new fish shell without any error
system
2.7.9
3.4.2
* 3.4.3 (set by /Users/username/.pyenv/version)
booklook
charon
cptsms
dokuwikiparser
lpmawagtail
newdefault
newdefaultbrew
pediscript
ugstream
wikimport
pyenv virtualenvs
booklook (created from /Users/username/.pyenv/versions/3.4.3)
charon (created from /Users/username/.pyenv/versions/2.7.9)
cptsms (created from /Users/username/.pyenv/versions/3.4.3)
dokuwikiparser (created from /Users/username/.pyenv/versions/3.4.3)
lpmawagtail (created from /Users/username/.pyenv/versions/3.4.3)
* newdefault (created from /Users/username/.pyenv/versions/3.4.3)
newdefaultbrew (created from /Users/username/.pyenv/versions/3.4.3)
pediscript (created from /Users/username/.pyenv/versions/3.4.2)
ugstream (created from /Users/username/.pyenv/versions/3.4.2)
wikimport (created from /Users/username/.pyenv/versions/3.4.3)
pyenv global
newdefault
This issue only arises with virtualenvs : if I set a "regular" version (e.g. 3.4.3) as the global, everything works smoothly.
I have the same problem with 2 different computers (both macs running Yosemite).
Is this still a problem for you? I've not yet reproduced the problem. From the error output, the activate.fish script created by virtualenv might be corrupted. But I don't know why....
What is virtualenv did you use to create virtualenv? virtualenv or pyvenv?
pyenv virtualenv --version shows your configuration
Does the problem persist even after once you recreate new virtualenv?
I just saw your previous comment, as I was off the grid for a while. The issue persisted for a while, but disappeared after several environment updates so it's hard to pinpoint the cause. Thank you for your support !
Activity
yyuu commentedon May 17, 2015
I couldn't reproduce the behaviour. Please let me know the following
pyenv versionspyenv virtualenvspyenv globaliodbh commentedon May 18, 2015
Here it is:
pyenv versionspyenv virtualenvspyenv globalThis issue only arises with virtualenvs : if I set a "regular" version (e.g. 3.4.3) as the global, everything works smoothly.
I have the same problem with 2 different computers (both macs running Yosemite).
yyuu commentedon Jun 26, 2015
Is this still a problem for you? I've not yet reproduced the problem. From the error output, the
activate.fishscript created by virtualenv might be corrupted. But I don't know why....pyenv virtualenv --versionshows your configurationyyuu commentedon Sep 22, 2015
I'll close this issue for now as stale issue. Feel free to reopen the issue if this is still a problem for you.
iodbh commentedon Sep 22, 2015
I just saw your previous comment, as I was off the grid for a while. The issue persisted for a while, but disappeared after several environment updates so it's hard to pinpoint the cause. Thank you for your support !