Skip to content

prompt does not change to show venv in zsh #364

@carolbooth2

Description

@carolbooth2

What is the problem?

A little 'gotcha' that got me!

  • I'm running Ubuntu 24.04
  • My default shell is zsh

In Visual Studio Code and in Ubuntu terminal, the prompt did not change when a venv was activated.

Changing shell by typing bash at the command line after activating the venv didn't help.
To get the same behaviour as in the lesson notes I had to:

  • launch bash shell in Ubuntu terminal before activating the venv
  • launch a bash shell from the 'Launch Profile' button to the right of the terminal

VSCode drop down menu 'Launch Profile'

Image

with venv_spacewalks activated...

my prompt in zsh:

user@laptop ~/BetterResearchSW/spacewalks
%

my prompt in bash:
(venv_spacewalks) user@laptop ~/BetterResearchSW/spacewalks $

Location of problem (optional)

https://carpentries-incubator.github.io/better-research-software/instructor/03-reproducible-dev-environment.html#managing-virtual-environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions