9

I have created a virtualenv in python 2.7 (Anaconda) on a dev machine and (after package installation) copied it to another windows machine in a PROD setting (no communication to outside). Executing any of the installed ".exe" entry points for a program in the virtualenv produces this error on the target machine however runs fine on the source machine:

(env) D:\app\pyvenv>env\Scripts\pip.exe
Fatal error in launcher: Unable to create process using '"'

The location of python installation on both machines is set to the same folder: C:\ProgramData\Anaconda2

Also see my additional notes at the bottom of this post. thanks

Jeff Saremi
  • 2,674
  • 3
  • 33
  • 57
  • 1
    Possible duplicate of [Pip - Fatal error in launcher: Unable to create process using '"'](http://stackoverflow.com/questions/37220055/pip-fatal-error-in-launcher-unable-to-create-process-using) – Fangxing Apr 25 '17 at 00:40
  • My question is not the same however very close. 1. My version of python is 2.7 and not 3 2. I'm running this in a virtualenv 3. Upgrading or installing anything on the destination is NOT possible since there is no connectivity anywhere. Had there been connectivity to the outside world I would not have run into this problem to begin with. 4. All other suggestions just don't apply – Jeff Saremi Apr 25 '17 at 04:42

5 Answers5

1

in my case, I previously changed the name of the python.exe executable to python3.exe so when I run:

virtualenv project1_env

it can't locate the python.exe if that was your case too .. just rename it again to python.exe and it should work.

mouad36
  • 306
  • 2
  • 10
1

In my case I solve by upgrading pip using following code in activate environment.

python -m pip install --upgrade pip
0

In my case I uninstalled venv and then installed it again and it worked. pip uninstall virtualenv to uninstall it and use pip install virtualenv to install it again.

Yash Tile
  • 51
  • 7
0

I had the same problem. Try making virtualenv with this command:

virtualenv --python C:\Path\To\Python\python.exe venv

Note that you should specify the path to your python installation folder after --python option.

AlirezaAsadi
  • 793
  • 2
  • 6
  • 21
0
python -m pip install --upgrade pip

Run this while in the venv. seems like a system change occured and reinstalling it restores it to default.

n1klaus
  • 19
  • 5