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



  • 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 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 – Mursalatul Pallob Mar 31 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 docs.python.org/3/library/venv.html. – user535733 Mar 31 at 15:52

You need to install python3-venv:

sudo apt install python3-venv


python3 -m venv vvv
source vvv/bin/activate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.