8000 Can't see Python virtualenv activation · Issue #1763 · romkatv/powerlevel10k · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can't see Python virtualenv activation #1763

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

Closed
andreafspeziale opened this issue Feb 10, 2022 · 14 comments
Closed

Can't see Python virtualenv activation #1763

andreafspeziale opened this issue Feb 10, 2022 · 14 comments

Comments

@andreafspeziale
Copy link

Hello! Thank you for your hard work!
Unfortunately when activating a Python virtual environment I can't see the name like "(myEnv)".
Schermata 2022-02-10 alle 17 00 59

This is my config file generated by using the wizard. Thank you in advance!

# The list of segments shown on the right. Fill it with less important segments.
  # Right prompt on the last prompt line (where you are typing your commands) gets
  # automatically hidden when the input line reaches it. Right prompt above the
  # last prompt line gets hidden if it would overlap with left prompt.
  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
    status                  # exit code of the last command
    command_execution_time  # duration of the last command
    background_jobs         # presence of background jobs
    direnv                  # direnv status (https://direnv.net/)
    asdf                    # asdf version manager (https://github.com/asdf-vm/asdf)
    virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)
    anaconda                # conda environment (https://conda.io/)
    pyenv                   # python environment (https://github.com/pyenv/pyenv)
    goenv                   # go environment (https://github.com/syndbg/goenv)
    nodenv                  # node.js version from nodenv (https://github.com/nodenv/nodenv)
    nvm                     # node.js version from nvm (https://github.com/nvm-sh/nvm)
    nodeenv                 # node.js environment (https://github.com/ekalinin/nodeenv)
    # node_version          # node.js version
    # go_version            # go version (https://golang.org)
    # rust_version          # rustc version (https://www.rust-lang.org)
    # dotnet_version        # .NET version (https://dotnet.microsoft.com)
    # php_version           # php version (https://www.php.net/)
    # laravel_version       # laravel php framework version (https://laravel.com/)
    # java_version          # java version (https://www.java.com/)
    # package               # name@version from package.json (https://docs.npmjs.com/files/package.json)
    rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)
    rvm                     # ruby version from rvm (https://rvm.io)
    fvm                     # flutter version management (https://github.com/leoafarias/fvm)
    luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)
    jenv                    # java version from jenv (https://github.com/jenv/jenv)
    plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)
    phpenv                  # php version from phpenv (https://github.com/phpenv/phpenv)
    scalaenv                # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
    haskell_stack           # haskell version from stack (https://haskellstack.org/)
    kubecontext             # current kubernetes context (https://kubernetes.io/)
    terraform               # terraform workspace (https://www.terraform.io)
    # terraform_version     # terraform version (https://www.terraform.io)
    aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
    aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
    azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)
    gcloud                  # google cloud cli account and project (https://cloud.google.com/)
    google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)
    toolbox                 # toolbox name (https://github.com/containers/toolbox)
    context                 # user@hostname
    nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)
    ranger                  # ranger shell (https://github.com/ranger/ranger)
    nnn                     # nnn shell (https://github.com/jarun/nnn)
    xplr                    # xplr shell (https://github.com/sayanarijit/xplr)
    vim_shell               # vim shell indicator (:sh)
    midnight_commander      # midnight commander shell (https://midnight-commander.org/)
    nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
    vi_mode                 # vi mode (you don't need this if you've enabled prompt_char)
    # vpn_ip                # virtual private network indicator
    # load                  # CPU load
    # disk_usage            # disk usage
    # ram                   # free RAM
    # swap                  # used swap
    todo                    # todo items (https://github.com/todotxt/todo.txt-cli)
    timewarrior             # timewarrior tracking status (https://timewarrior.net/)
    taskwarrior             # taskwarrior task count (https://taskwarrior.org/)
    time                    # current time
    # ip                    # ip address and bandwidth usage for a specified network interface
    # public_ip             # public IP address
    # proxy                 # system-wide http/https/ftp proxy
    # battery               # internal battery
    # wifi                  # wifi speed
    # example               # example user-defined segment (see prompt_example function below)
  )
@romkatv
Copy link
Owner
romkatv commented Feb 10, 2022

What's is the output of the following command after activating virtual environment?

typeset -pm 'VIRTUAL_ENV|POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV'

@andreafspeziale
Copy link
Author

It is:

export VIRTUAL_ENV=/Users/XYZ/Desktop/test/myEnv
typeset POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false

@romkatv
Copy link
Owner
romkatv commented Feb 11, 2022

Open ~/.p10k.zsh search for POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV and change it's value to true. Does that help?

@andreafspeziale
Copy link
Author

It worked!
Schermata 2022-02-11 alle 14 12 02

Thank you!

@dima-naboka
Copy link

hello, i've set typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=true but I still don't see venv in the prompt; could you please have a look

~/gi/o/pgbackup_cloudguru │ master ▓▒░ grep POWERLEVEL9K_VIRTUALENV ~/.p10k.zsh                           
8000
           ░▒▓ ✔ │ 37s │ 3.9.9 pgbackup_cloudguru  │ 14:02:34
 typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
 typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=true
 typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=true
 typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
 # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

Screenshot 2022-08-16 at 14 03 45

@romkatv
Copy link
Owner
romkatv commented Aug 16, 2022

@dima-naboka There is virtual environment on the right side of prompt in your screenshot.

@dima-naboka
Copy link

sorry, i got it

@romkatv
Copy link
Owner
romkatv commented Nov 25, 2022

@pankaj-clumio If something doesn't work for you, open an issue.

@imakashy00
Copy link

Hi @romkatv loved you theme. Got same issue, can't see python virtual env name

Changed the :

Open ~/.p10k.zsh search for POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV and change it's value to true.
But is not working.

Screenshot from 2024-07-12 17-08-50

Thanks in advance.

@shashinvision
Copy link
POWERLEVEL9K_VIRTUALENV_

Work for me, Thanks

@ryanpeach
Copy link
POWERLEVEL9K_VIRTUALENV_

Work for me, Thanks

What worked for you?

@ryanpeach
Copy link

Oh, It worked if I made the terminal wide enough, it just hides if the name is long.

@smilesxu
Copy link
smilesxu commented Mar 1, 2025

I don't want to see the global python version, is that possible?

@romkatv
Copy link
Owner
romkatv commented Mar 1, 2025

Probably. You'll need to be more specific. Open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
0