0
PS C:\Users\38099\Desktop\courses> pipenv install django==4.0.8
Creating a virtualenv for this project...
Pipfile: C:\Users\38099\Pipfile
Using C:/Users/38099/AppData/Local/Programs/Python/Python311/python.exe (3.11.1) to create virtualenv...
[    ] Creating virtual environment...created virtual environment CPython3.11.1.final.0-64 in 501ms
  creator CPython3Windows(dest=C:\Users\38099\.virtualenvs\38099-inBhiGOL, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\38099\AppData\Local\pypa\virtualenv)
    added seed packages: pip==23.0, setuptools==67.1.0, wheel==0.38.4
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

Successfully created virtual environment!
Virtualenv location: C:\Users\38099\.virtualenvs\38099-inBhiGOL
Installing django==4.0.8...
Resolving django==4.0.8...
Installing...
Adding django to Pipfile's [packages] ...
Installation Succeeded
Installing dependencies from Pipfile.lock (664a36)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

I need to install virtual environment and Django version in my directory C:\Users\38099\Desktop\courses>. But every time the location of virtual environment is C:\Users\38099\.virtualenvs\38099-inBhiGOL. Pipenv in my Powershell is installed. I also have folder .venv in my explorer, but it ignores it anyway, choosing different location.

sinoroc
  • 18,409
  • 2
  • 39
  • 70
Dima
  • 3
  • 2

1 Answers1

0

If you want your virtualenv to be created in your project folder, and not in the default ~/.local/share/virtualenvs/ folder, set the environment variable PIPENV_VENV_IN_PROJECT to 1 (export PIPENV_VENV_IN_PROJECT=1 in your terminal).

See the pipenv doc

thmslmr
  • 1,251
  • 1
  • 5
  • 11