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

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

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

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

pytoxbot opened this issue Sep 17, 2016 · 3 comments

Comments

@pytoxbot
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Original comment by @cjw296

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

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant