jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

ck2cti from 2.1.2 Py-3.4 on Windows returns "Unable to create process" #247

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install 2.1.2 from the SourceForge for Python 3.4
2. Run ck2cti -h from a command window

What is the expected output? What do you see instead?
Expected output is the help screen.

Actual output is:

Unable to create process using 'C:\src\anaconda\envs\py34\python.exe 
"C:\Python34\Scripts\ck2cti.py"  -h'

It seems the Shebang at the top of the ck2cti file is being interpreted by 
Python to point to the wrong Python instance. I'm unsure if this is also 
problem for Python 3.3 or 2.7. The easy fix is to edit the ck2cti file and 
remove the shebang. I don't know where this is coming from in the source 
either...

Original issue reported on code.google.com by bryan.w....@gmail.com on 22 Dec 2014 at 9:12

GoogleCodeExporter commented 9 years ago
The shebang line in the original ck2cti script is just:

    #!/usr/bin/env python

Which, according to https://docs.python.org/3/using/windows.html#shebang-lines 
is supposed to be interpreted as meaning the default Python installation on 
Windows. But distutils decides to do some magic and replace that with the 
absolute path to the Python interpreter on the system I used to build the 
binaries.

There are some suggestions in this StackOverflow thread for how to make it not 
do that, though I'm not sure if they work, or have any unwanted side effects.

http://stackoverflow.com/questions/1530702/dont-touch-my-shebang

Original comment by yarmond on 22 Dec 2014 at 10:20

GoogleCodeExporter commented 9 years ago
Thanks Ray, glad to know that's why I couldn't find it in the source. It seems 
like if you set the --executable option to be equal to what is already in the 
script, it should solve the problem there, but whether it would introduce 
problems elsewhere is, as you say, unclear.

Bryan

Original comment by bryan.w....@gmail.com on 23 Dec 2014 at 6:35

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r3355.

Original comment by yarmond on 6 Jan 2015 at 11:37