10

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?

0

8 Answers 8

28

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
Sign up to request clarification or add additional context in comments.

Comments

8

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.

2 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
2

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.

Comments

1

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

Comments

0

This issue is also present in virtualenvwrapper-win.

The system cannot find the path specified

Here's how they resolved it

"I changed WORKON_HOME to C:\PythonEnvs and it now works."

So, the advice on windows continues to be: no spaces in path names.

Comments

0

I had this problem after installing both python versions 2.7 and 3.4, fixed after upgrading virtualenv on python 3.4 version with command:

pip3 install --upgrade virtualenv

Comments

0

I could solve the same error using following command inside venv.

python -m easy_install pip

Comments

0

I had this exact problem with respect to pip and had to upgrade my python installation to 2.7.6 and reinstall pip.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.