pythonpython-3.xpippython-venvcmder

My pip install venv installing modules for all users instead of creating just one venv in creating project


While creating a new environment venv in a new project I'm typing in the command line: '''python -m venv new_prj''' After that, I'm installing some pip module ''' pip install django==2 ''' - for example and it's automatically change all my other projects with venv and install that '''django==2''' to all projects instead of just installing to my new_prj dir How can I solve this problem? I'm working on windows 10


Solution

  • Kindly try activating before installing any package.

    Generally a venv needs to be activated before accessing its modules and in windows you can do that by executing the bat file in the Scripts folder in the venv.

    You can try the follwing

    C:\Users\'Username'\path\to\new_prj\Scripts\activate.bat