-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip install on Windows causes "failed to create process" #298
Comments
Could you please copy here the output of running "python" and "pip --version"? |
I'm not using |
Glad that it works with the installer. The question is, are you using Python 3.5 for something else? Would you mind installing instead the x86 version? https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe If you are just fine running with the installer version, then this issue could be closed. Thank you! |
I have no problem with anything other than |
Yes we plan to support Python3, we will improve it, accept pull rquests related to it... it is just that it was recently introduced and it might be slightly less mature. This seems not to be a Python3 issue, but a Python3 64bits - 32bits issue. There are other users using Python3 from pip successfully, so my guess was the python 32/64. Ok, lets keep this open, it is not an urgent issue, as you can work from the installer, we will have a look when possible. Thanks again! |
Just tested with Python 3.5.1 x86 on Windows 10, and |
Same issue with:
|
I ran into this issue also with both the 32-bit and 64-bit versions of Python. When installing Python, I used the defaults, so in both cases, Python was installed into either I suspect the issue is actually the space in the path as covered in pypa/pip#2783. |
Probably, in fact I always install python to C:/PythonXX in windows. I am trying to reproduce the issue with 32 bits python3 (as reported by @KindDragon to fail), without success: $ which python
/c/Users/memsharded/Envs/conanpip3/Scripts/python
$ python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information. Conan installs and runs just fine. I am using virtualenvs, and the path for python is also without spaces. For the path with spaces issue, there is little that conan can do to fix it. So IMHO the remaining issue would be to create pip packages for conan for Python3-64bits. |
Still can reproduce:
"c:\Program Files (x86)\Python35-32\Lib\site-packages\conans\conan.py" works fine |
Same issue with 64-bit Python:
|
|
Same results with 0.12 |
Process Monitor shows that conan.exe trying to run So issue with Python path that contain spaces |
Yes, certainly, thanks for debugging this. The only problem is that the conan.exe is not under our control, it is created by pip, so I guess very little we can do here. Maybe submit the issue to pip project? |
I found pip issue pypa/pip#2783 |
@KindDragon I see a merged PR and should be currently released in setuptools. I don't know if pypi needs to update something too. I've generated a pip package for the develop branch, Could someone try it? pip install conan==0.12.1.dev0 |
Nope, same result: "failed to create process." |
@KindDragon thanks, So pypi site have to update its setuptools too. :( |
So I had a similar problem yesterday, and it sounds like I can help with this issue. The windows installer for Python3+ 64-bit will put create the python directory under the Program Files (C:\Program Files\Python3x). When you try to run conan, you will be running the conan-script.py in the Python\Scripts directory. The first line of that file when using pip install and default windows installation of Python will look like this #!c:\program files\python35\python.exe. This is a problem because of the space in program files, but can be fixed by encapsulating the path in quotes like so that windows will treat the space as part of the path: #!"c:\program files\python35\python.exe". TL;DR Encapsulate the path in the first line of C:\Program Files\Python35\Scripts\conan-script.py to #!"c:\program files\python35\python.exe" to fix the issue |
I also had the "failed to create process." message. Adding quotes to the path of python in conan-script.py, as proposed by @wRastel solved this problem on my machine (Python 3.4 32bit, installed in "C:\Program Files (x86)\Python34"). Maybe those quote should be added by default? |
Thanks @Pixinn for reporting. The thing is that it is out of our scope, and it is more a python issue than a conan issue. You can check https://github.com/conan-io/conan/blob/develop/setup.py, this is what we are using to create the python package. Is python/pip/setuptools what is creating that conan-script.py file with such path to your local python installation. pypa/pip#2783 It seems that some solutions have ben provided, but maybe they are not merged in py3.4 and only in latest 3.5 or 3.6? My suggestion: Install python in C:\Python3X, or maybe better, be clean, and install virtualenvwrapper-win and use virtualenvs for everything python related. |
Thanks for your answer @memsharded. You're right, its a python issue and not a conan one, I did not realize it. Furthermore, this pb was indeed corrected in python 3.5.3. |
Thanks @Pixinn for telling. I think this issue can be closed now, nothing we can do here. I have added a note in the docs->Install instructions (will be published in a couple of days), clarifying this point. |
JFYI issues still exist with Conan 0.21.2 |
Hi @KindDragon , thanks for updating the status. Yes it is still failing ,but also still something that is out of our reach, it is under the control of Python. Unfortunately, we can't do anything to fix this, just recommend (as done in the notes of http://docs.conan.io/en/latest/installation.html) to install python in a path without spaces (or use virtualenvs-recommended for everything related to python, in some path without spaces) |
We have added a section in "troubleshoot", briefly explaining how to use virtualenvs, which is a practical and elegant solution to this issue: http://docs.conan.io/en/latest/faq/troubleshooting.html#error-failed-to-create-process |
Yupp, this solution for this issues of Unable to create process using in venv. This will surely help you and fix your issues. |
If anyone gets I got these errors after installing VS 2022. The VS installer really does some weird things with spaces in paths... I deleted VS logs in my user directory — and after that |
Thanks for the tip @MLIOSBond. Certainly one of the things that I have learned to avoid is path with spaces in Windows, specially in user/account name. Really a pain for many tools out there. |
When I use
pip install conan
to install conan, it will be installed successfully but then runinngconan
will be failed by this error:My config is:
Windows 10 64bit
Python 3.5.1 64bit
The text was updated successfully, but these errors were encountered: