0

While trying to automate a process I need to run C:\"Program Files\Microsoft Visual Studio 10.0"\VC\bin\vcvars32.bat using the Python script. I tried it as below

p= subprocess.Popen('C:\\"Program Files\\Microsoft Visual Studio 10.0"\\VC\\bin\\vcvars32.bat', shell=True,stdin=sub.PIPE,stdout=sub.PIPE, stderr=sub.STDOUT,)

but it throws an error as below:

Setting environment for using Microsoft Visual Studio 2010 x86 tools.

ERROR: Cannot determine the location of the VS Common Tools folder.

while on the contrary If I run the same command manually at the command prompt, it is a success.

Elisha
  • 4,811
  • 4
  • 30
  • 46
user1495220
  • 111
  • 1
  • 2
  • 15
  • possible duplicate of http://stackoverflow.com/questions/3461275/vs2010-command-prompt-gives-error-cannot-determine-the-location-of-the-vs-comm – Elisha Jan 28 '15 at 09:43
  • @Elisha but I am able to run the command manually, it just fails when I run it using the Python script. – user1495220 Jan 28 '15 at 09:56
  • according to the other Q i added, it can be PATH variable issue, what is the PATH value when you run with Popen? – Elisha Jan 28 '15 at 10:05
  • Regarding `'C:\\"Program Files\\Microsoft Visual Studio 10.0"\\VC\\bin\\vcvars32.bat'` Why are you using 2 different paren types? – KymikoLoco Dec 01 '15 at 21:41

0 Answers0