So for years I worked in a buildout shop, and now I'm in a Debian-packages-are-good-enough shop, and I'm looking to improve that situation. For some of my libraries at work, I want to get cross-version testing straightened out a bit, and tox seems to be the state of the art. (Yes, Python 2.7 is part of the mix, but getting past that means getting library tests running on Python 3 before we tackle applications.) I'm using a fairly simple tox.ini file, defining three environments built on top of "clean" Python installations: ------------------------ [tox] envlist = py27,py35,py36 [testenv] commands = python -m unittest discover -p *tests.py -p *test.py install_command = pip install -r tox-requirements.txt {opts} {packages} [testenv:py27] basepython = /opt/kt-python27/bin/python2 [testenv:py35] basepython = /opt/kt-python35/bin/python3 [testenv:py36] basepython = /opt/kt-python36/bin/python3 ------------------------ The tox-requirements.txt is pretty minimal, and doesn't do anything particularly interesting, but does include options to use a local DevPI server instead of PyPI. My project has a venv based on my clean python 3.6 installation. tox is installed into the venv. When running bin/tox, tox creates an sdist for my library package, then creates the venvs and installs my package into them. When nearly complete, the installation fails because of an attempt to write a script into the system /usr/bin, which shouldn't happen in the venv: ------------------------ GLOB sdist-make: /home/fdrake/p/ks3.mediaflux/setup.py py27 create: /home/fdrake/p/ks3.mediaflux/.tox/py27 py27 inst: /home/fdrake/p/ks3.mediaflux/.tox/dist/ks3.mediaflux-3.5.0.zip ERROR: invocation failed (exit code 1), logfile: /home/fdrake/p/ks3.mediaflux/.tox/py27/log/py27-1.log ERROR: actionid: py27 msg: installpkg cmdargs: ['/home/fdrake/p/ks3.mediaflux/.tox/py27/bin/pip', 'install', '-r', 'tox-requirements.txt', '/home/fdrake/p/ks3.mediaflux/.tox/dist/ks3.mediaflux-3.5.0.zip'] Looking in indexes: http://devpi/root/pypi/+simple/, http://devpi/keeper/keepertech/+simple/ Processing ./.tox/dist/ks3.mediaflux-3.5.0.zip ... Successfully built ks3.mediaflux Installing collected packages: six, funcsigs, pbr, mock, idna, chardet, certifi, urllib3, requests, kt.testing, zc.lockfile, kt.common, pytz, itsdangerous, Werkzeug, click, MarkupSafe, Jinja2, Flask, aniso8601, flask-RESTful, netaddr, kt.restful, ks3.mediaflux Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/pbr' Consider using the `--user` option or check the permissions. ------------------------ If I manually cd into .tox/py27 and running bin/pip install -r ../../tox-requirements.txt succeeds, and there's no attempt to write into /usr/bin/. Doing that for each of the environments allows tox to run the tests and produce the expected summary. At this point, I presume I've done some ridiculous in my configuration somewhere. Is there something obvious to others that I'm just missing because I'm not familiar with the tools? Thanks! -Fred -- Fred L. Drake, Jr. <fred at fdrake.net> "A storm broke loose in my mind." --Albert Einstein