Fatal error when using scripts through virtualenv - extra quotes around python.exe

I am very new to Python and recently installed Python 2.7.6 x86 on Windows. I am trying to create an environment via virtualenv. I installed Python, then installed pip and virtualenv globally. I then CD'd to the directory I wanted to create an environment in and ran virtualenv env. Then I activated it with env\scripts\activate. Now, when I try to run any of the scripts through virtualenv (pip, easy_install, etc.) I get the following error:

Fatal error in launcher: Unable to create process using
'""[dir]\env\Scripts\python.exe"" "[dir]\env\Scripts\pip.exe" --version'

Note the extra quotes around the python exe. It has two sets of quotation marks, not just one set.

I have a feeling that this is a path error. The path is getting set in activate.bat, but looks correct there - set "VIRTUAL_ENV=[dir]\env"

Let me reiterate that scripts work fine globally. I am only seeing this error in virtualenv.

Where is that extra set of quotation marks coming from? How can I get rid of it?

I had this problem, because i put my virtual env directory in a directory with .(dot) and spaces in name. When i renamed the parent dir, it worked.

Fatal error in launcher: Unable to create process using ""C:\Program , to an escaped path without spaces and quotes and pad with spaces (dots at the end should be So you can do the same being 'virtualenv' another package you want. See Archimedix answer for more information about the path. open pip.​exe in 7zip and extract __main__.py to Python\Scripts folder. The solution: use sys.executable, sys.version_info.major, and sys.version_info.minor to find the pythonXx.dll in the same location, and copy it along with python.exe when setting up the virtualenv. NOTE: This should be done for the .so on linux as well so that the LD_LIBRARY_PATH environment variable does not pollute things there.

Same error for me here. Until I tried the following (being inside of my venv) and it worked:

(venv) > python -m pip

or

(venv) > python -m easy_install

‍🤝‍ ‍ Fatal error when using scripts via virtualenv, Fatal error when using scripts through virtualenv - extra quotes around python.​exe I am very new to Python and have recently installed Python 2.7.6 Anastasya Lundquist. when using scripts through virtualenv - extra quotes around python.exe May 7 '14. 5 How to set up .sublimelinterrc to ignore pep8 errors Sep

I was able to get over this error by creating my directory which will have virtual environment under C:\Python27 and it worked for me.

🥦 How to check exact words in Laravel?, Actually, I don't remember if you need ^ $ delimiters in the regular expression, but this is easy to Use Rule; in your controller to access the rule class Fatal error when using scripts via virtualenv - extra quotes around python.exe - python  Okay, it looks like a change in distlib to put quotes around paths with spaces in them is conflicting with the launcher doing the same thing - hence the double quotes. It would seem like the correct fix would be for the launcher not to add quotes if some are already there.

Reinstall python inside a folder without spaces and it should work.

Using pip launcher on Windows when path contains spaces · Issue , Spaces in Python path make pip-installed launchers fail on Windows #2783 using '"C:\Python34\python.exe" "c:\Python34\Scripts\pip.exe" install --upgrade spyder' Fatal error in launcher: Unable to create process (or Virtualenv and I think pip should support the double " , like windows cmd, such as Via pip install, the shebang in <packagename>-script.py is #!C:\Program Files (x86)\Python27\python.exe instead of (via python setup.py install) #!"C:\Program Files (x86)\Python27\python.exe" Note that both launcher scripts actually work when executed directly: only the launcher .exe seems to be more strict about

I had this exact problem with respect to pip and had to upgrade my python installation to 2.7.6 and reinstall pip. I hope that helps you!

Unable to run pip v. 10.0.0 with python 3.6.5 on Win 7 64 · Issue , However, I've no idea why that extra quote would be appearing, or even what it's appearing in. I don't see an obvious way we can work around this in pip, unfortunately. virtualenv-pip10-pfmoore\Scripts\python.exe -m pip install -U Fatal error in launcher: Unable to create process using '""c:\program  Thanks. I do not get the same behaviour (Windows 10 64-bit, Python 3.6.2 64-bit):. PS>python -m pip --version pip 9.0.3 from C:\Users\Gustav\.virtualenvs\5ba9a2da89fcba2\lib\site-packages (python 3.6) PS>python -m pip install --upgrade pip Collecting pip Using cached pip-10.0.0-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 9.0.3 Uninstalling pip-9.0.3

DjangoGirls/tutorial, opbox\djangogirls\myvenv\Scripts\pip.exe" install django==1.7'. :( I believed that this error I'm having was because of different python versions but now I don'​t /fatal-error-in-launcher-unable-to-create-process-using-c-program-files-x86 /fatal-error-when-using-scripts-through-virtualenv-extra-quotes-around-python-e. There is a problem when trying to run pip.exe when the path of Python installation contain spaces. Some launcher code adds extra quotes, which results in incorrect path and results in fatal error in launcher. See for example http://stackoverflow.com/questions/24627525/fatal-error-in-launcher-unable-to-create-process-using-c-program-files-x86.

Changelog, so what do you mean when you said 'I noticed Django uses Python 2.x so I tried to point /24627525/fatal-error-in-launcher-unable-to-create-process-using-c-​program-files-x86 /fatal-error-when-using-scripts-through-virtualenv-extra-​quotes-around-python-e I get : #!c:\users\olga\djangogirls_venv_\scripts\python​.exe With python3 -m venv --without-pip venv, the command exits without any errors, but the virtualenv is completely broken. Almost empty in fact. python.exe isn't even present in the Scripts directory. With python3 -m virtualenv --no-setuptools --no-wheel --no-pip venv, the command also exits without any errors. At first glance the virtualenv seems OK.

Fatal error when using scripts through virtualenv - extra quotes around python.​exe. I am very new to Python and recently installed Python 2.7.6 x86 on Windows​. If no relevant options are set, the commands python and python2 will use the latest Python 2.x version installed and the command python3 will use the latest Python 3.x installed. The commands python3.1 and python2.7 will not consult any options at all as the versions are fully specified.

Comments
  • I'm accepting this as the new answer to this question after all this time because I recently installed Python on a new machine and ran into this issue again, and when I checked my virtualenv path, it did indeed have spaces in it. When I removed the spaces from the path name, I no longer had the issue. Thanks for the suggestion!
  • I had the same issue, but mine was because I had a dash (-) in the directory name... sigh
  • I used this solution and it worked, thanks! (I did not have any dots or spaces in my path.)
  • Were you not using 2.7.6 when this happened to you? I am using 2.7.6, and I can't upgrade any further because the libraries I want to use in the future aren't available for 3.x.