No such file or directory: '.tox/py33/bin/pip'
Hi,
I'm trying to use tox, but when I run it, I get the following error (full stacktrace below):
FileNotFoundError: [Errno 2] No such file or directory: '.tox/py33/bin/pip'
I'm running Tox on a project created with Cookiecutter, in a virtualenv, on my Mac.
This is my tox.ini:
[tox] envlist = py33, style [testenv] setenv = PYTHONPATH = {toxinidir}:{toxinidir}/HuetonApi deps = -r{toxinidir}/requirements.txt pytest commands = python setup.py test [testenv:style] deps = -r{toxinidir}/requirements.txt flake8 commands = python setup.py flake8
And I have no idea how to fix this :-) thanks for the help!
Full stacktrace:
py33 installdeps: -r/Users/erikp/User Files/Projects/python/hueton/HuetonApi/requirements.txt, pytest Traceback (most recent call last): File "/Users/erikp/Envs/hueton/bin/tox", line 9, in <module> load_entry_point('tox==1.6.1', 'console_scripts', 'tox')() File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 26, in main retcode = Session(config).runcommand() File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 301, in runcommand return self.subcommand_test() File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 433, in subcommand_test if self.setupenv(venv): File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 358, in setupenv status = venv.update(action=action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 142, in update self.install_deps(action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 272, in install_deps self._install(deps, action=action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 334, in _install extraenv=extraenv) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 303, in run_install_command extraenv=env, action=action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 382, in _pcall return action.popen(args, cwd=cwd, env=env, redirect=redirect) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 96, in popen popen = self._popen(args, cwd, env=env, stdout=f, stderr=STDOUT) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 153, in _popen stdout=stdout, stderr=stderr, env=env) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/subprocess.py", line 820, in __init__ restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/subprocess.py", line 1438, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '.tox/py33/bin/pip'
Comments (16)
-
-
do you also get that with "tox -r -e py33"?
-
Wow, you are fast ;-). Yes, I get the same error, both using virtualenv and without.
-
Btw, this is the project, in case you'd like to check it out (it's only a few lines of code): https://github.com/bodiam/hueton
-
the
-r
means recreate. /me off for today. -
I removed everything by hand, executed tox -r, but I got the same error. Also tried using sudo, but still same error... Thanks for helping me out btw, much appreciated!
-
- edited description
-
Hi Holger,
Any idea how to fix this? I still have this issue, it would be great if I knew where to look how to fix this!
Thanks!
-
it works for me"
(0)hpk@teta:~/p/hueton/HuetonApi$ tox -e py33 GLOB sdist-make: /home/hpk/p/hueton/HuetonApi/setup.py py33 create: /home/hpk/p/hueton/HuetonApi/.tox/py33 py33 installdeps: -r/home/hpk/p/hueton/HuetonApi/requirements.txt, pytest py33 inst: /home/hpk/p/hueton/HuetonApi/.tox/dist/HuetonApi-0.1.0.zip py33 runtests: commands[0] | python setup.py test running test running egg_info writing dependency_links to HuetonApi.egg-info/dependency_links.txt writing top-level names to HuetonApi.egg-info/top_level.txt writing HuetonApi.egg-info/PKG-INFO reading manifest file 'HuetonApi.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'HuetonApi.egg-info/SOURCES.txt' running build_ext =================================== test session starts ==================================== platform linux -- Python 3.3.2 -- pytest-2.4.0.dev12 collected 12 items test/test_GroupsApi.py ... test/test_HuetonApi.py .. test/test_LightsApi.py ....... ================================ 12 passed in 0.14 seconds ================================= _________________________________________ summary __________________________________________ py33: commands succeeded congratulations :) (0)hpk@teta:~/p/hueton/HuetonApi$
Please paste a full log, trying to do the same and include the output of
tox --version
andvirtualenv --version
. -
"it works on your machine.". Interesting to hear! I guess you're running it on linux right, not on a mac? Thanks for trying it out btw!
-
linux, yes. but i am pretty sure people are using tox successfully on osx so it remains odd what is going on here. Can you paste the full log and versions as i asked for?
-
Ah, sorry, I missed that. I'll do that tonight! Thanks!
-
Sorry, a bit later than expected, but here's my complete output:
(hueton)Eriks-MacBook-Pro:HuetonApi erikp$ tox -r -v -e py33 using tox.ini: /Users/erikp/User Files/Projects/python/hueton/HuetonApi/tox.ini using tox-1.6.1 from /Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/__init__.py GLOB sdist-make: /Users/erikp/User Files/Projects/python/hueton/HuetonApi/setup.py /Users/erikp/User Files/Projects/python/hueton/HuetonApi$ /Users/erikp/Envs/hueton/bin/python3 /Users/erikp/User Files/Projects/python/hueton/HuetonApi/setup.py sdist --formats=zip --dist-dir /Users/erikp/User Files/Projects/python/hueton/HuetonApi/.tox/dist >/Users/erikp/User Files/Projects/python/hueton/HuetonApi/.tox/log/tox-0.log py33 create: /Users/erikp/User Files/Projects/python/hueton/HuetonApi/.tox/py33 /Users/erikp/User Files/Projects/python/hueton/HuetonApi/.tox$ /Users/erikp/Envs/hueton/bin/python3.3 /Users/erikp/Envs/hueton/lib/python3.3/site-packages/virtualenv.py --setuptools --python /Users/erikp/Envs/hueton/bin/python3.3 py33 >/Users/erikp/User Files/Projects/python/hueton/HuetonApi/.tox/py33/log/py33-0.log py33 installdeps: -r/Users/erikp/User Files/Projects/python/hueton/HuetonApi/requirements.txt, pytest Traceback (most recent call last): File "/Users/erikp/Envs/hueton/bin/tox", line 9, in <module> load_entry_point('tox==1.6.1', 'console_scripts', 'tox')() File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 26, in main retcode = Session(config).runcommand() File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 301, in runcommand return self.subcommand_test() File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 433, in subcommand_test if self.setupenv(venv): File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 358, in setupenv status = venv.update(action=action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 142, in update self.install_deps(action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 272, in install_deps self._install(deps, action=action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 334, in _install extraenv=extraenv) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 303, in run_install_command extraenv=env, action=action) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_venv.py", line 382, in _pcall return action.popen(args, cwd=cwd, env=env, redirect=redirect) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 96, in popen popen = self._popen(args, cwd, env=env, stdout=f, stderr=STDOUT) File "/Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/_cmdline.py", line 153, in _popen stdout=stdout, stderr=stderr, env=env) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/subprocess.py", line 820, in __init__ restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/subprocess.py", line 1438, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '.tox/py33/bin/pip' (hueton)Eriks-MacBook-Pro:HuetonApi erikp$
And tox --version: 1.6.1 imported from /Users/erikp/Envs/hueton/lib/python3.3/site-packages/tox/init.py
And virtualenv --version: 1.10.1
And python version: Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
I hope this helps!
Thanks,
Erik
-
A suggestion. The missing file ".../bin/pip" is normally created when the virtual-environment is created by virtualenv (and tox). It uses the pip installation package from "virtualenv_support" as part of "virtualenv".
Try the following to see where the problem is located:
- Create a new virtualenv and ensure that pip is installed
virtualenv xxx cat xxx/bin/pip
- Try to do the same with tox by using an empty "testenv:xxx" in an extended "tox.ini":
tox -e xxx
NOTE: You may need to remove the installed virtualenv version and install it from scratch. Ensure that all "virtualenv" and "virtualenv_support" directories (or copies from it) are removed under "site-packages" before you reinstall "virtualenv".
-
This issue has been moved to GitHub: https://github.com/tox-dev/tox/issues/123
-
- changed status to on hold
- Log in to comment
Btw, I checked: in the directory I'm running this the directory it's looking for does exist. But probably my virtualenvwrapper is messing things up, but I don't want to get rid of that.
(btw, I also tried without using using the workon of virtualenvwrapper, but I get the same error)