I have two versions of Python 3.6.1 and 3.6.2
I have a sample script below:
#! python3
import arcpy
print ("Gurminder")
The code runs by default with 3.6.1 as I have specified it to run with python3
However is there any way that I can force the compiler to run the with python 3.6.2?
Is there any parameter where I can specify the subversion of the python interpreter to be used?
I am aware of running the python with its interpreter executables for example:
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" D:\inetpud_backup_17_04_2018\Gurminder\Cases\02104091\test.py'
The command works fine in command prompt however when it is run using os or subprocess module I get the error for the white space between the Program Files
Hence on researching the issue, I found the workaround on specifying the version in the header. Is there any way to define the subversion as well?
subprocess.call(["C:\\Program Files\\ArcGIS\\Pro\bin\\Python\\envs\\arcgispro-py3\\python.exe", "D:\\inetpud_backup_17_04_2018\\Gurminder\\Cases\\02104091\\test.py"])if you want to use a specificpython.exe.