Skip to content
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

Internal use of 'which' program raises exception under Windows #6

Open
piotr-dobrogost opened this issue Aug 29, 2011 · 2 comments
Open

Comments

@piotr-dobrogost
Copy link

When running this command
C:\Documents and Settings\pdobrogost>python c:\Python\2.7\Scripts\ve-init
I get this execption

Traceback (most recent call last):
  File "c:\Python\2.7\Scripts\ve-init", line 19, in <module>
    main(*sys.argv[1:])
  File "c:\Python\2.7\Scripts\ve-init", line 16, in main
    return vecmd.virtualenv(*args)
  File "c:\python\2.7\lib\site-packages\vecmd\commands.py", line 71, in virtualenv
    return script.python(script.which('virtualenv'), '-q', *args)
  File "c:\python\2.7\lib\site-packages\vecmd\script.py", line 127, in which
    return capture('which', *args).strip()
  File "c:\python\2.7\lib\site-packages\vecmd\script.py", line 105, in capture
    return subprocess.Popen(args, stdout=subprocess.PIPE).communicate()[0]
  File "c:\python\2.7\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "c:\python\2.7\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Printing args at line 105 of script.py shows vecmd tries to execute which program which is not available on Windows. On newer versions of Windows there's equivalent called where - see http://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-windows

@piotr-dobrogost
Copy link
Author

Anybody here?

@dragon788
Copy link

@piotr-dobrogost This probably needs to use where or whereis instead of which, but I'm not positive, it looks like you are on the right track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants