5

I installed virtualenv and I created a virtual environment inside my directory. Everything is OK, but I can't activate it. When I run:

source /bin/activate

it says:

already: command not found

Screenshot:

img_virtualenv

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
  • 1
    Hi and welcome. Please do not have pictures of text, always include the text in the body of the question so everyone can see it. The error is clear in the directory you are running the command from it does not exist. – David Mar 31 '21 at 13:23
  • but i run this command almost in every directory...it is only working in home/ directory....but not working in side a folder which is also in home – Md. Mursalatul Islam Pallob Mar 31 '21 at 14:06
  • A virtualenv only works in a specific directory. You get to specify the directory when you create the venv. This does not seem like an Ubuntu-related question. This seems like a how-do-I-use-python-venv question. There are some good examples at https://docs.python.org/3/library/venv.html. – user535733 Mar 31 '21 at 15:52

1 Answers1

6

You need to install python3-venv:

sudo apt install python3-venv

Then:

python3 -m venv vvv
source vvv/bin/activate
GAD3R
  • 2,821
  • 1
  • 18
  • 30