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

Tox fails with no such option: --pre #126

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

Comments

Projects
None yet
1 participant
@pytoxbot

pytoxbot commented Sep 17, 2016

Offending line: https://bitbucket.org/hpk42/tox/src/f7f70c5ce0b49656688bb78f8b4f5a1a8f489d7f/tox/_config.py?at=default#cl-333

This option fails with pip==1.3.1.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

Issue #139 was marked as a duplicate of this issue.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

fix issue126: depend on virtualenv>=1.10.1 so that we can rely
(hopefully) on a pip version which supports --pre. (tox by default
uses to --pre). Note that tox also vendors an older virtualenv
for supporting python2.5 -- although the latter will be dropped at some point.

→ <<cset 7a16cd37007c>>

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by cpcloud

Upgrading my virtualenv to 1.10.1 "fixed" the problem. Not sure how many people are still using older versions.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

Maybe tox just needs to depend on virtualenv>=1.10.1 given that it vendors an earlier virtualenv for python2.5?

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @jenisys

I also stumbled over this problem several times.

It is related with virtualenv and its virtualenv_support package that stores copies of pip, setuptools (and distribute) installation packages. Therefore, it can happen that pip-1.3.1 is the installed pip version after you create a new virtual-environment (with tox). The current virtualenv-0.10.1 version normally installs pip-1.4.1 from its "virtualenv_support" directory (but note that virtualenv>=0.10 dropped support for python2.5).

In addition, there seem to be multiple copies of "virtualenv_support" sometimes. This seems to occur when you install/upgrade virtualenv once with pip and once with easy_install (setuptools). Therefore, a feasible workaround can be to remove "virtualenv" and all its "virtualenv_support" directories from the "site-packages" directory and reinstall "virtualenv" again.

Maybe the best way is that the configuration option "install_command" is not only a function of the python version but also of the pip version (that gets installed per default).

WORK-AROUNDS:

  • Define "install_command = pip install {opts} {packages}" in "tox.ini"
  • Ensure a clean virtualenv with pip-1.4.1 in its "virtualenv_support" directory (for Python>=2.6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment