Search code examples
pythonsqlalchemyalembic

alembic "failed to create process." in Windows7


I already installed python2.7, pip, env and alembic successfully,

I try to run command "alembic init elembic" in command prompt but it not success, it show the message "failed to create process.".

Anyone why and how to solve it?


Solution

  • You are probably seeing this as a result of a pip bug where it fails to correctly quote the python install path if it includes any spaces.

    You can work around it by either installing python to a path without any spaces or editing the first line of scripts generated by pip in the \Scripts directory. The generated first line looks something like:

    #!c:\program files\python 2.7\python.exe
    

    and needs to have quotes added around the path like this:

    #!"c:\program files\python 2.7\python.exe"