0
Virtualenv not creating in Windows 10
I am trying to create a virtual environment in command prompt. When i typed virtualenv env then it is showing like this created virtual environment CPython3.8.8.final.0-64 in 591ms creator CPython3Windows(dest=C:\Users\hp\env, 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\hp\AppData\Local\pypa\virtualenv) added seed packages: pip==21.0.1, setuptools==54.1.2, wheel==0.36.2 activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
1 Respuesta
+ 2
virtualenv is an external library in Python and it was designed to work with older Python versions.
In recent Python, there is also a builtin venv library that does more or less the same, and you should probably use that rather than virtualenv.
Typically you create a virtual environment by project. Based on your output message it seems you created a venv folder in your user root. You should first navigate to the folder where your python program / app / script will be, and create the venv inside there.
After creating the env, you also need to activate it, running the activation script. This will make sure that python will first check the virtual environment when running something, rather that the global python installation.
Please see this tutorial and follow the instructions carefully, make sure you understand what is actually happening.
https://realpython.com/python-virtual-environments-a-primer/
See also
https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/