Python Virtual Environment - Prompt Prepended with virtual env name #390
-
Hi. Thanks guys your works are awesome. Could anyone please help with below marked text to disable I just want the Theme Virtual env Prompt nothing else. Terminal: Windows Terminal |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 13 replies
-
Did you follow the install guide to set the prompt in your powershell profile? What does it look like? |
Beta Was this translation helpful? Give feedback.
-
@jiaulislam that's controlled by what's in the activate script. If you look at its content, there should be a switch to disable prepending the prompt (they hijack the current prompt). Depending on the type of virtual env you either need |
Beta Was this translation helpful? Give feedback.
-
EDIT: I didn't read well the reply for @JanDeDobbeleer. I was trying to put the env. variable VIRTUAL_ENV_DISABLE_PROMPT in the PW profile but I had to place it in the activate ps1 file of the venv folder. But I managed to make this universal for any new virtualenv created and not only the virtualenv of an actual project. Just have to put VIRTUAL_ENV_DISABLE_PROMPT in
I Hope it helps for anyone! Hi! Where do I have to put VIRTUAL_ENV_DISABLE_PROMPT=1? I putted in my ps1 profile file after the theme import but it didn't work. Like this:
Thanks in advance :D |
Beta Was this translation helpful? Give feedback.
-
Hello, awesome work, Thank you |
Beta Was this translation helpful? Give feedback.
-
Hello |
Beta Was this translation helpful? Give feedback.
-
conda config --set changeps1 False |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi thanks for your input, could you help me to be able to see my surroundings every time I activate it in my power shell console please. When I run conda activate testEnvironmentCreation1 in my terminal does not appear: I have noticed that the environment is not activated My profile file is as follows: Could you show me how to find the json file, which modification would be the correct one to be able to visualize when activating and deactivating virtual environments. Thank you |
Beta Was this translation helpful? Give feedback.
@jiaulislam that's controlled by what's in the activate script. If you look at its content, there should be a switch to disable prepending the prompt (they hijack the current prompt). Depending on the type of virtual env you either need
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
,VIRTUAL_ENV_DISABLE_PROMPT=1
or something different. Best to look at what's in the script on your end ;-)