1

I installed virtualenv using pip install vitualenv in my Windows 10. Then, I created a folder named venv_test (path= C:\Users\JATIN SAINI\Desktop\venv_test) to test creating a virtual environment in it.
I have my Python 3.9.6 globally installed at path C:\Users\JATIN SAINI\AppData\Local\Programs\Python\Python39\ and it is also added to the Environment Variables in my Windows.

I typed the following commands after changing directory to venv_test:

C:\Users\JATIN SAINI\Desktop\venv_test>virtualenv env created virtual environment CPython3.9.6.final.0-64 in 758ms creator CPython3Windows(dest=C:\Users\JATIN SAINI\Desktop\venv_test\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\JATIN SAINI\AppData\Local\pypa\virtualenv) added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2 activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator C:\Users\JATIN SAINI\Desktop\venv_test>cd env\Scripts\ C:\Users\JATIN SAINI\Desktop\venv_test\env\Scripts>activate (env) C:\Users\JATIN SAINI\Desktop\venv_test\env\Scripts>python Unable to create process using 'c:\users\jatin saini\appdata\local\programs\python\python39\python.exe' (env) C:\Users\JATIN SAINI\Desktop\venv_test\env\Scripts>pip list Unable to create process using 'c:\users\jatin saini\appdata\local\programs\python\python39\python.exe "C:\Users\JATIN SAINI\Desktop\venv_test\env\Scripts\pip.exe" list' 

The error is Unable to create process.

  • I have tried completely uninstalling python from my system and reinstalling but same error comes!

I read in the documentation of virtualenv that :

Created python virtual environments are usually not self-contained. A complete python packaging is usually made up of thousands of files, so it’s not efficient to install the entire python again into a new folder. Instead virtual environments are mere shells, that contain little within themselves, and borrow most from the system python (this is what you installed, when you installed python itself). This does mean that if you upgrade your system python your virtual environments might break, so watch out. The upside of this, referring to the system python, is that creating virtual environments can be fast.

Now, according to this as my system python is working fine, it should also work fine in the virtual environment but I really can't figure out why!!!

Similar question Virtual Environment not being recognized in python interpreter

5
  • Try running python using its full path... like <virtual-env>/bin/python -v Commented Jul 6, 2021 at 7:30
  • @sureshvv (env) C:\Users\JATIN SAINI\Desktop\venv_test\env\Scripts>"C:\Users\JATIN SAINI\Desktop\venv_test\env\Scripts\python" -v Unable to create process using 'c:\users\jatin saini\appdata\local\programs\python\python39\python.exe -v Same error. Commented Jul 6, 2021 at 7:35
  • Don't use virtualenv. Use module venv. python3 -m venv. Remove virtualenv and start over. Commented Jul 6, 2021 at 8:18
  • okay, I will. But I read that "virtualenv" is the one stop solution for all things virtual env. in python and "venv" which comes pre-installed with python has less features. So, it would be great if this worked! btw thanks. Commented Jul 6, 2021 at 8:44
  • virtualenv was a python2 solution that doesn't want to die :) Commented Jul 6, 2021 at 8:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.