Skip to content
Advertisement

Virtual environment is active, but nothing is actually affected in Python 3 [closed]

I’m coding in Python, and I’m trying to create a virtual environment for an educational project I’m about to start. As the tutorials said, I used venv for this:

JavaScript

After this command, I see the environment’s name in my terminal

JavaScript

which seems fine.

However, I’m told that after these commands, which python3 should output the new python3 interpreter that’s used in this environment (somewhere in tutorials-env/), but it’s still /usr/bin/python3.

Screenshot:

Screenshot Creating a virtual env and testing it

I also tried to install packages with pip3 to see if the installed packages are installed in the environment or system-wide, and I realized that pip3 is installing stuff system-wide (I tried switching between environments and install packages inside each of them independently, but it affects all environments).

I also tried using virtualenv but the same thing happened.

Am I doing something wrong? My python3’s version is 3.8.2, and I’m on Ubuntu 20.04 LTS.

Advertisement

Answer

I’m suspicious about the special characters in directory name :, which could be causing troubles.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement