Help: Conda Environment Doesn't display #1103
Replies: 12 comments 34 replies
-
Has anyone successfully included conda environment information in their prompt? |
Beta Was this translation helpful? Give feedback.
-
If you want the conda environment to show you need to change the segment's |
Beta Was this translation helpful? Give feedback.
-
I am still facing this issue, any potential solutions? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm facing this issue with
it seems that the python segment failed. But why? |
Beta Was this translation helpful? Give feedback.
-
I have the same problem and I am not finding any solution, I dont know why. oh-my-posh debug: Version: 18.9.1 Shell: powershell (5.1.22621.1778) Prompt: powershell 0ms Segments: ConsoleTitle(true) - 1 ms Run duration: 49.2605ms Cache path: C:\Users\javie\AppData\Local\oh-my-posh Config path: C:\Users\javie\AppData\Local\Programs\oh-my-posh\themes\myprofile.omp.json Logs: [DEBUG] 16:13:53.626 shell.go:Getenv:392 → NO DATA |
Beta Was this translation helpful? Give feedback.
-
I too am having this issue; using miniconda (which I am not a fan of but is required for WSL and Tensorflow) with my shell as ZSH, my terminal as Windows Terminal. My personal theme is: { The relevant section as: Only {{ .Full }} is displayed (additionally this is not showing on ~. The output of oh-my-posh debug --config ~/dotfiles/oh-my-posh/themes/calo.omp.json (after running conda activate tf) is as follows: WSL at james@ -KIRK ~ conda activate tf Version: 18.11.0 Shell: zsh (5.8.1) Prompt: WSL at james@ -KIRK ~ Segments: ConsoleTitle(false) - 0 ms Run duration: 7.579395ms Cache path: /home/james/.cache/oh-my-posh Config path: /home/james/dotfiles/oh-my-posh/themes/calo.omp.json Logs: [DEBUG] 23:16:59.868 shell.go:Getenv:392 → NO DATA [TRACE] 23:16:59.870 shell.go:Pwd() - 64ns Any advice would be much appreciated! (PS I totally love oh-my-posh so thank you! :) ) |
Beta Was this translation helpful? Give feedback.
-
{
"foreground": "#FFE873",
"style": "diamond",
"properties": {
"fetch_virtual_env": true,
"display_mode": "environment",
"home_enabled": true
},
"template": "\ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}",
"type": "python"
}
|
Beta Was this translation helpful? Give feedback.
-
At your file of configuration theme of oh my-posh in my case pure.omt.json add the suggested by [HHBB1022]
|
Beta Was this translation helpful? Give feedback.
-
hi!i have got the same error that the virtual env name dont displayed.this is the .omp.json i'm using. Version: 19.11.2 Shell: powershell (5.1.22621.2506) Prompt:
ALANSHAO ❯ Segments: ConsoleTitle(false) - 0 ms Run duration: 82.3465ms Cache path: C:\Users\ALANSHAO\AppData\Local\oh-my-posh Config path: C:\Users\ALANSHAO\AppData\Local\Programs\oh-my-posh\themes\bubblesextra.omp.json Logs: [DEBUG] 19:49:57.757 shell.go:Getenv:398 → NO DATA |
Beta Was this translation helpful? Give feedback.
-
Guys, can someone help me set conda environment name in my oh my posh? I tried what you do but im not getting it JSON: {
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
{
"command": "paste",
"keys": "ctrl+v"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
],
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"newTabMenu":
[
{
"type": "remainingProfiles"
}
],
"profiles":
{
"defaults":
{
"font":
{
"face": "Hack Nerd Font Mono"
}
},
"list":
[
{
"commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell"
},
{
"commandline": "%SystemRoot%\\System32\\cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
},
{
"guid": "{bee0a8f2-24d2-5a79-afb9-d127a6623c77}",
"hidden": false,
"name": "Developer Command Prompt for VS 2022",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{04b02090-8b40-50ce-84e2-186816286544}",
"hidden": false,
"name": "Developer PowerShell for VS 2022",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{16208362-94fc-5b1f-a491-5b2624d5ab56}",
"hidden": true,
"name": "Visual Studio Debug Console",
"source": "VSDebugConsole"
}
]
},
"schemes":
[
{
"background": "#0C0C0C",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#012456",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell Powershell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#282C34",
"black": "#282C34",
"blue": "#61AFEF",
"brightBlack": "#5A6374",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
"brightRed": "#E06C75",
"brightWhite": "#DCDFE4",
"brightYellow": "#E5C07B",
"cursorColor": "#FFFFFF",
"cyan": "#56B6C2",
"foreground": "#DCDFE4",
"green": "#98C379",
"name": "One Half Dark",
"purple": "#C678DD",
"red": "#E06C75",
"selectionBackground": "#FFFFFF",
"white": "#DCDFE4",
"yellow": "#E5C07B"
},
{
"background": "#FAFAFA",
"black": "#383A42",
"blue": "#0184BC",
"brightBlack": "#4F525D",
"brightBlue": "#61AFEF",
"brightCyan": "#56B5C1",
"brightGreen": "#98C379",
"brightPurple": "#C577DD",
"brightRed": "#DF6C75",
"brightWhite": "#FFFFFF",
"brightYellow": "#E4C07A",
"cursorColor": "#4F525D",
"cyan": "#0997B3",
"foreground": "#383A42",
"green": "#50A14F",
"name": "One Half Light",
"purple": "#A626A4",
"red": "#E45649",
"selectionBackground": "#4F525D",
"white": "#FAFAFA",
"yellow": "#C18301"
},
{
"background": "#002B36",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#FFFFFF",
"cyan": "#2AA198",
"foreground": "#839496",
"green": "#859900",
"name": "Solarized Dark",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#FDF6E3",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#002B36",
"cyan": "#2AA198",
"foreground": "#657B83",
"green": "#859900",
"name": "Solarized Light",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#073642",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#FFFFFF",
"cyan": "#06989A",
"foreground": "#D3D7CF",
"green": "#4E9A06",
"name": "Tango Dark",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#FFFFFF",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#000000",
"cyan": "#06989A",
"foreground": "#555753",
"green": "#4E9A06",
"name": "Tango Light",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#555753",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#000080",
"brightBlack": "#808080",
"brightBlue": "#0000FF",
"brightCyan": "#00FFFF",
"brightGreen": "#00FF00",
"brightPurple": "#FF00FF",
"brightRed": "#FF0000",
"brightWhite": "#FFFFFF",
"brightYellow": "#FFFF00",
"cursorColor": "#FFFFFF",
"cyan": "#008080",
"foreground": "#C0C0C0",
"green": "#008000",
"name": "Vintage",
"purple": "#800080",
"red": "#800000",
"selectionBackground": "#FFFFFF",
"white": "#C0C0C0",
"yellow": "#808000"
}
],
"themes": [],
"background": "#bbbbbb",
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"style": "diamond",
"properties": {
"fetch_virtual_env": true,
"display_mode": "environment",
"home_enabled": true,
"display_virtual_env": true,
"display_default": true
},
"template": " \ue235 {{ .Venv }} ",
"type": "python"
} NOTEPAD: oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json' | Invoke-Expression CONDA but oh my posh debug says
|
Beta Was this translation helpful? Give feedback.
-
can someone suggest how to fix this issue? I am using conda environment, but the name of env pushes the input line to the second row. |
Beta Was this translation helpful? Give feedback.
-
Conda environment doesn't display -- only see Python version.
Using the powelevel10k_classic, and just installed oh-my-posh today (so it's the latest)
I'm rather new, so forgive me if I've overlooked something obvious. The python segment is in the theme file. The resulting prompt includes info on the python version, but the 'conda environment' is not processed. For instance, see the image below for when my 'web' conda environment is activated...
Though the python version shows, I don't see the conda environment. I googled, but couldn't find anything on this (other than a previous trouble - but, at least they had 'base' showing, I don't even get that).
Thanks
Beta Was this translation helpful? Give feedback.
All reactions