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
fish_config doesn't work without curses module #8487
Please tell us which fish version you are using by executing the following:
fish --version fish, version 3.3.1
echo $version
Please tell us which operating system and terminal you are using. The output of uname -a and echo $TERM may be helpful in this regard although other commands might be relevant in your specific situation.
Linux localhost.localdomain 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Tue Jun 29 21:55:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:
sh -c 'env HOME=$(mktemp -d) fish'
Running that didn't help. I'm just trying to go into the config so I'll post my command/output below
tech@localhost ~> sh -c 'env HOME=$(mktemp -d) fish'
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
tech@localhost /h/tech> fish_config
Traceback (most recent call last):
File "/usr/share/fish/tools/web_config/webconfig.py", line 1547, in
esc = get_special_ansi_escapes()
File "/usr/share/fish/tools/web_config/webconfig.py", line 511, in get_special_ansi_escapes
import curses
File "/usr/local/lib/python3.9/curses/init.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'
You'll have to install the curses python module. If you build your own python, you'll have to install the ncurses headers (in the package ncurses-devel) before doing so. So you would now have to install that and rebuild python against it.
If not, you'll have to check where RHEL packages it and install that.
Ok well I installed ncurses, but after that what am I supposed to do? I still get the same error when trying to open the fish_config
tech@localhost /h/tech [1]> ncurses6-config --version
6.1.20180224
tech@localhost /h/tech>
Did you mean I would have to completely reinstall Python after I installed the ncurses module?
You appear to have built python yourself, from source. That's why it's in /usr/local/. You built it before you had the ncurses headers installed, so you need to install those and rebuild python against them.
This isn't a fish-specific issue, your python installation is incomplete. You can trigger it with:
python3.9 -c 'import curses'
(ncurses is really really quite important, and also a dependency of fish itself. the library itself was always installed, you're just missing the headers so things you build yourself can be built against it)
I am saying to rebuild python. You appear to have done something to install it that's not just yum install python, and that built it from source and that did not pick up the ncurses headers and so it did not build the curses module.
The way to do that is to, yes, redo the steps you did to install python, making sure that it doesn't just pick up the same build again. It needs to actually compile it again, it can't just go "oh I made this python version already, let me just reuse that!". How to do that depends on how you built it.
If you did just yum install python (or dnf), then you'll have to check with whoever built that package to get a curses module.
Wow... well i did reinstall python myself because it kept installing and older version of python and I wanted to install 3.9
I dont remember how I installed it though. I'm gonna have to do some digging to see how to rebuild it.
Okay, I now made it so it would pick the xterm values if the curses module can't be loaded. We don't use it for a lot here, and the fallback is the correct choice in the majority of cases (because most modern terminals are like xterm in most things).
The actual fix is still for you to fix your python installation, but only you can do that.
Activity
faho commentedon Nov 25, 2021
You'll have to install the curses python module. If you build your own python, you'll have to install the ncurses headers (in the package ncurses-devel) before doing so. So you would now have to install that and rebuild python against it.
If not, you'll have to check where RHEL packages it and install that.
TechDevJorge commentedon Nov 27, 2021
Ok well I installed ncurses, but after that what am I supposed to do? I still get the same error when trying to open the fish_config
tech@localhost /h/tech [1]> ncurses6-config --version
6.1.20180224
tech@localhost /h/tech>
Did you mean I would have to completely reinstall Python after I installed the ncurses module?
faho commentedon Nov 27, 2021
You appear to have built python yourself, from source. That's why it's in /usr/local/. You built it before you had the ncurses headers installed, so you need to install those and rebuild python against them.
This isn't a fish-specific issue, your python installation is incomplete. You can trigger it with:
(ncurses is really really quite important, and also a dependency of fish itself. the library itself was always installed, you're just missing the headers so things you build yourself can be built against it)
TechDevJorge commentedon Nov 27, 2021
SO you're saying uninstall/reinstall Python? Or am i not understanding you correctly?
faho commentedon Nov 27, 2021
I am saying to rebuild python. You appear to have done something to install it that's not just
yum install python, and that built it from source and that did not pick up the ncurses headers and so it did not build the curses module.The way to do that is to, yes, redo the steps you did to install python, making sure that it doesn't just pick up the same build again. It needs to actually compile it again, it can't just go "oh I made this python version already, let me just reuse that!". How to do that depends on how you built it.
If you did just
yum install python(ordnf), then you'll have to check with whoever built that package to get a curses module.TechDevJorge commentedon Nov 27, 2021
Wow... well i did reinstall python myself because it kept installing and older version of python and I wanted to install 3.9
I dont remember how I installed it though. I'm gonna have to do some digging to see how to rebuild it.
faho commentedon Nov 27, 2021
Okay, I now made it so it would pick the xterm values if the curses module can't be loaded. We don't use it for a lot here, and the fallback is the correct choice in the majority of cases (because most modern terminals are like xterm in most things).
The actual fix is still for you to fix your python installation, but only you can do that.
[-]Trying to access fish_config[/-][+]fish_config doesn't work without curses module[/+]CHANGELOG updates for 3.4.0