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

py.test integration fails with Python 3.3 on Mac OSX #140

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

py.test integration fails with Python 3.3 on Mac OSX #140

pytoxbot opened this issue Sep 17, 2016 · 5 comments

Comments

@pytoxbot
Copy link

Running tox configured to use Python 3.3 using the py.test integration detailed at http://testrun.org/tox/latest/example/pytest.html, I get:

#!text
WARNING:test command found but not installed in testenv
  cmd: /usr/local/bin/py.test
  env: /Users/petri/Code/koodaamo/jetstream/src/jetstream.core/.tox/py33
Maybe forgot to specify a dependency?
Traceback (most recent call last):
  File "/usr/local/bin/py.test", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2607, in <module>
    parse_requirements(__requires__), Environment()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: py==1.2.1
ERROR: InvocationError: '/usr/local/bin/py.test'
__________________________________________________________________________ summary ___________________________________________________________________________
ERROR:   py33: commands failed

@pytoxbot
Copy link
Author

Original comment by @hpk42

fix issue140: depend on virtualenv>=1.11.1

→ <<cset 9dce275b9bbd>>

@pytoxbot
Copy link
Author

Original comment by @Themanwithoutaplan

It looks like this is no longer happening since virtualenv 1.11.1 was released.

@pytoxbot
Copy link
Author

Original comment by @Themanwithoutaplan

Just an update on this. If tox has been installed and run with Python 3.3 on the same folder then it will subsequently behave itself.

@pytoxbot
Copy link
Author

Original comment by @Themanwithoutaplan

@hpk42 Hi Holger, I'm getting the same error. The tox.ini is in my gviz-data-table repo, nothing fancy. Tripped over the error yesterday when I reinstalled a project I'd messed up.

#!python

(gviz-data-table)fuchsia-4:gviz-data-table charlieclark$ tox -r -v -e py33
using tox.ini: /Users/charlieclark/Projects/gviz-data-table/tox.ini
using tox-1.6.1 from /Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/__init__.pyc
GLOB sdist-make: /Users/charlieclark/Projects/gviz-data-table/setup.py
  /Users/charlieclark/Projects/gviz-data-table$ /Users/charlieclark/Projects/gviz-data-table/bin/python /Users/charlieclark/Projects/gviz-data-table/setup.py sdist --formats=zip --dist-dir /Users/charlieclark/Projects/gviz-data-table/.tox/dist >/Users/charlieclark/Projects/gviz-data-table/.tox/log/tox-0.log
py33 recreate: /Users/charlieclark/Projects/gviz-data-table/.tox/py33
  /Users/charlieclark/Projects/gviz-data-table/.tox$ /opt/local/bin/python3.3 /Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/virtualenv.py --setuptools --python /opt/local/bin/python3.3 py33 >/Users/charlieclark/Projects/gviz-data-table/.tox/py33/log/py33-0.log
py33 installdeps: pytest
WARNING:test command found but not installed in testenv
  cmd: /Users/charlieclark/Projects/gviz-data-table/bin/pip
  env: /Users/charlieclark/Projects/gviz-data-table/.tox/py33
Maybe forgot to specify a dependency?
  /Users/charlieclark/Projects/gviz-data-table$ /Users/charlieclark/Projects/gviz-data-table/bin/pip install --pre pytest >/Users/charlieclark/Projects/gviz-data-table/.tox/py33/log/py33-1.log
py33 inst: /Users/charlieclark/Projects/gviz-data-table/.tox/dist/gviz_data_table-1.0.1.zip
WARNING:test command found but not installed in testenv
  cmd: /Users/charlieclark/Projects/gviz-data-table/bin/pip
  env: /Users/charlieclark/Projects/gviz-data-table/.tox/py33
Maybe forgot to specify a dependency?
  /Users/charlieclark/Projects/gviz-data-table$ /Users/charlieclark/Projects/gviz-data-table/bin/pip install --pre /Users/charlieclark/Projects/gviz-data-table/.tox/dist/gviz_data_table-1.0.1.zip >/Users/charlieclark/Projects/gviz-data-table/.tox/py33/log/py33-2.log
py33 runtests: commands[0] | /Users/charlieclark/Projects/gviz-data-table/.tox/py33/bin/py.test
Traceback (most recent call last):
  File "/Users/charlieclark/Projects/gviz-data-table/bin/tox", line 9, in <module>
    load_entry_point('tox==1.6.1', 'console_scripts', 'tox')()
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_cmdline.py", line 26, in main
    retcode = Session(config).runcommand()
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_cmdline.py", line 301, in runcommand
    return self.subcommand_test()
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_cmdline.py", line 440, in subcommand_test
    self.runtestenv(venv)
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_cmdline.py", line 448, in runtestenv
    venv.test(redirect=redirect)
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_venv.py", line 358, in test
    self._pcall(argv, cwd=cwd, action=action, redirect=redirect)
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_venv.py", line 382, in _pcall
    return action.popen(args, cwd=cwd, env=env, redirect=redirect)
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_cmdline.py", line 96, in popen
    popen = self._popen(args, cwd, env=env, stdout=f, stderr=STDOUT)
  File "/Users/charlieclark/Projects/gviz-data-table/lib/python2.7/site-packages/tox/_cmdline.py", line 153, in _popen
    stdout=stdout, stderr=stderr, env=env)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in __init__
    errread, errwrite)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@pytoxbot
Copy link
Author

Original comment by @hpk42

Can you post the content of you tox.ini and the full output of tox -r -v -e py33?

@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