Issue #123 new

No such file or directory: '.tox/py33/bin/pip'

Erik Pragt avatarErik Pragt created an issue

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 (14)

  1. Erik Pragt

    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)

  2. Erik Pragt

    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!

  3. holger krekel

    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 and virtualenv --version.

  4. holger krekel

    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?

  5. Erik Pragt

    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

  6. jenisys

    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".

  7. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.