Search code examples
pythonbashubuntuvirtual-environment

Virtual Environment and Base Environment are Active at the Same Time


I'm using Ubuntu Linux. I started the terminal and created a virtual environment as follows: python3 -m venv test. Then when I activated the test virtual environment by typing source test/bin/activate, in the prompt base environment was also showed as active.

Why both base and virtual environment are active at the same time? How to solve this issue?

Prompt is like that:

(test) (base) tkarahan@tkarahan:~$ 

Solution

  • The last environment you activate is active. It’s just an UI glitch caused by combining anaconda with some other environment manager.

    You can check which Python is in your PATH with which

    which python