Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda "failed to create process"

I am a newbie to Python. I just installed Python (anaconda python 2.7) and while launching Anaconda prompt something happened which was "failed to create process"

enter image description here

So can anyone here help me out please? I appriciate every help.

like image 321
khuongngoc Avatar asked Feb 10 '17 06:02

khuongngoc


3 Answers

I encountered the exact same error, because my username included a space. ("C:\Users\Ben Ji") The easiest solution is to install Anaconda to another folder in the Users-folder, e.g. public.

(The same error occurs when using pip, check out https://stackoverflow.com/a/35275384/6580199)

like image 163
Benji Avatar answered Sep 21 '22 06:09

Benji


Anaconda uses an executable that starts Python with a script. The executable retrieves its own name, strips off ".exe" and post-pends "-script.py". In that script file, check the first line of the script corresponding to the command. It should have a she-bang pointing at the correct Python executable, something like:

#!C:/ProgramData/Anaconda3/python.exe

You can use forward and back slashes interchangeably in this line. If the link points to the wrong place, you'll get "failed to create process." If the link needs spaces, you can put it in double-quotes, like this:

#!"C:/Users/My special name/my special place/python.exe"

Single quotes and back slash escape on spaces don't seem to work for the executable path,... go figure.

Note that if you don't coordinate the name of the executable file with the name of the script, you'll get a "Cannot open" error rather than "failed to create process."

like image 20
Frank M Avatar answered Sep 21 '22 06:09

Frank M


I tried installing as administrator and it worked. Right click on installer and 'Run as administrator'.

like image 27
addcolor Avatar answered Sep 18 '22 06:09

addcolor