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

ERROR: InvocationError: could not find executable 'virtualenv' #155

Closed
pytoxbot opened this Issue Sep 17, 2016 · 3 comments

Comments

Projects
None yet
1 participant
@pytoxbot

pytoxbot commented Sep 17, 2016

So, this is using Python 3.3.0 on Windows 7.

I see this:

<tools path>\Scripts\python.exe -c "import pip; pip.main();" install --upgrade tox

...gives:

Requirement already up-to-date: tox in <tools path>\lib\site-packages
Requirement already up-to-date: virtualenv>=1.11.2 in <tools path>\lib\site-packages (from tox)
Requirement already up-to-date: py>=1.4.17 in <tools path>\lib\site-packages (from tox)

Looking at versions:

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tox
>>> tox.__version__
'1.7.0'
>>> import py
>>> py.__version__
'1.4.20'
>>> import virtualenv
>>> virtualenv.__version__
'1.11.4'

When I attempt to do:

<tool path>\Scripts\python.exe -c "import tox; tox.cmdline();" -
c tox.ini -v
using tox.ini: <workspace>\tox.ini
using tox-1.7.0 from <tools path>\lib\site-packages\tox\__init__.py
py26 create: <workspace>\.tox\py26
ERROR: InvocationError: could not find executable 'virtualenv'

Stepping through _venv.VirtualEnv.getcommandpath suggests that py.path.local.sysfind is being called with:

(Pdb) self.envconfig.envbindir
local('<workspace>\\.tox\\py26\\Scripts')

...rather than the local('<tools>\\Scripts') I would expect.

This is the call to create .tox\py26, so its scripts will not exist yet.

The tox.ini in question is here:

https://github.com/Simplistix/mush/blob/master/tox.ini

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

fix issue158 and fix issue155: windows/virtualenv properly works now:
call virtualenv through "python -m virtualenv" with the same
interpreter which invoked tox. Thanks Chris Withers, Ionel Maries Cristian.

→ <>

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @cjw296

Yep, backing out 2280714 fixes the problem.

Steps to reproduce:

  1. make sure your path is clean and has no virtualenv on it.
  2. create a new virtualenv on windows
  3. install tox into that virtualenv
  4. use the resultant tox.exe to run a tox.ini in another folder

You will see the problem.

@pytoxbot pytoxbot closed this Sep 17, 2016

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @cjw296

My guess is that it's related to pull-request #84.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment