I am using Source Code Pro for Powerline. I am attaching a screenshot.

Well. It seems like your font does not have the python icon on that codepoint (or maybe not at all). Which strategy of awesome terminal fonts do you use?
Btw. You could easily change the icon by setting POWERLEVEL9K_PYTHON_ICON to whatever icon you have in your font. ;)
I am using patching strategy because I was sure I was going to use only one font Source Code Pro. Also I know I can change the icon, I wanted to know if anyone else faced the same issue and how they resolved it.
Interesting. The python icon is the "snake" emoji.
So echo $'\U1F40D' shows the wrong symbol on your machine, right?
Maybe you need an additional font package to display them (e.g. on ubuntu linux). In OSX it should work out of the box.
@dritter It did work. Thanks. But I am kind of unsatisfied. I have seen emojis look prettier on my friends Mac.
Well, if you find a prettier icon, you can overwrite the default one ;)
Is there any way I can use nerd fonts with the current scenario?
Yes, but it takes a little effort. You'll have to overwrite every icon by setting the right environment variables. You can get a full list of icons with get_icon_names.
The reason why we do not have a mapping for nerd font is because they change the codepoints depending on the combination of merged fonts. So we cannot give a list of icons for every combination.
Thanks @dritter but I guess I will stick to what I have since it will require some work.
There seems to be a bug.
By default POWERLEVEL9K_PYTHON_ICON: (\ue63c, which seems to be a Chinese character).
I say it's a bug, because I don't see a reason why the Python icon should be a Chinese character, even if there are fonts that support it.
It should be \U1F40D (snake) or \UE73C (python logo) instead.
The problem is in functions/icons.zsh.
In addition, on a dark terminal, black font dark blue is hard to read, so I changed it to black on cyan.
To workaroud the bug, I have this in my .zshrc, after including powerlevel9k (to be able to override the function):
# POWERLEVEL9K_PYTHON_ICON='\U1F40D ' # 🐍
POWERLEVEL9K_PYTHON_ICON='\UE73C ' #
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n "$virtualenv_path" && "$VIRTUAL_ENV_DISABLE_PROMPT" != true ]]; then
"$1_prompt_segment" "$0" "$2" "cyan" "black" "$(basename "$virtualenv_path")" 'PYTHON_ICON'
fi
}
@cvmocanu \ue63c is the setting for flat, awesome-fontconfig and awesome-patched, if you use nerdfont-complete or nerdfont-fontconfig as your POWERLEVEL9K_MODE you will get \ue73c as python icon.
In case of POWERLEVEL9K_MODE=awesome-mapped-fontconfig you'll get the snake (\u1f40d) as Python icon by default
Sorry, my bad.
I had POWERLEVEL9K_MODE incorrectly set to awesome-fontconfig while using Nerd fonts... (tips to others: it should be nerdfont-complete or nerd-fontconfig).
Most helpful comment
Sorry, my bad.
I had
POWERLEVEL9K_MODEincorrectly set toawesome-fontconfigwhile using Nerd fonts... (tips to others: it should benerdfont-completeornerd-fontconfig).