I am trying to access the curl executable on my computer using a subprocess call, but when I do so, I get the following error:
WindowsError: [Error 2] The system cannot find the file specified
my code looks as follows
path = 'C:\\Users\\Username\\AppData\\Local\\Continuum\\Anaconda2\\Library\\bin\\curl.exe
subprocess.call([path])
I know the path is correct, is there a reason that my script is balking at this? As you can see, I am running the Anaconda2 Python Interpreter, not the standard one from Python.org
os.path.exists(path)is true. I assume you're replacing"UserName"with the actual user name, but try to generalize this to arbitrary users. For example:anaconda_path = os.path.join(os.environ['LOCALAPPDATA'], 'Continuum', 'Anaconda2');curl_path = os.path.join(anaconda_path, 'Library', 'bin', 'curl.exe').