-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
Allow specifying pip version #791
Comments
The latest behaviour here is due to Related: #448 |
Is that still accurate ? Since today (new release?!), some of our AppVeyor builds (Python 2.7 builds) fail with an outdated The issue is explicit:
I bumped into #765 then here :/ |
soon you can override the default version into pip, in the meantime please upgrade virtualenv alongside tox to get later defaults.👌 |
And yes with the latest version we no longer download latest pip. |
When installing tox use the force reinstall flag to get latest virtualenv 😀 |
Thanks for this light-speed answer 😄 Does tox uses the pip version of the virtualenv ? |
tox creates virtual environments that have their seed packages (pip, setuptools, wheel) with the version bundled within the virtualenv installed alongside it. you can of course use the deps then to upgrade to install another version. Or just upgrade virtualenv to have newer bundles. |
As described in: tox-dev/tox#791
This attempts to fix the recent failures on Windows, as suggested by tox-dev/tox#791
There is https://github.com/pglass/tox-pip-version which does what this issue requests, I believe
|
@gaborbernat This doesn't actually work in my experience. It will install a version of pip, yes, but tox will not actually use that new version of pip to install the rest of the dependencies. The reason is because tox runs one pip command to install everything, like [testenv]
deps =
pip==19.1
requests Some other things I've tried:
It is true that if you install a specific version of
Hence, I did make a plugin for this (see previous comment), but it would be much nicer for this to be a native feature. |
This will be fixed on the virtualenv side, I'm actively working on pypa/virtualenv#1366, I hope to have something by the end of the month. |
The re-install hopefully upgrades versions tox-dev/tox#791
The re-install hopefully upgrades versions tox-dev/tox#791
Any update on that? I am looking for a workaround that can be used today, without waiting for a newer version of virtualenv. |
@ssbarnea do you want "latest" -- you can re-enable virtualenv's downloading by setting the testenv [testenv]
download = true |
No direct progress on this. Made some progress on the tox rewrite that will allow me to test the virtualenv rewrite... Coming along but this is a major effort (fixing a lot of hard issues while at it - e.g. lazy configuration load), so probably will last into September. |
FWIW I'm using tox-venv because I've had some trouble with virtualenv in the past. This means I get whatever pip which ships with Python's ensurepip (as of Python 3.8.1, that's pip 19.2.3). However, I needed to install manylinux2014 wheels, which requires pip 19.3... Installing tox-pip-version and setting |
tox-venv will become obsolete once pypa/virtualenv#1481 lands, and that will also solve this issue on virtualenv side 👍 |
I've been hearing about virtualenv rewrites for the past five years or so, so I wonder how this one turns out - good luck! 🤞 |
This one is very close to ship-able, 😊 so will actually happen, the latest end of February! I'm fully committed now to deliver it. |
Updating virtualenv that is installed alongside tox may not be an option since it may not support target python. E.g. my host Python is 3.7 and my target Python is 2.6 / 3.4. Therefore I can install the most recent tox, but I cannot install the most recent virtualenv with most recent virtualenv dependencies. |
Hello @Kentzo sadly we no longer support Python2.6, even at the target level. Python3.4 should still work. |
I just hope that this issue will not resurface in the future. tox's dependency on virtualenv_support is a major PITA. |
Not sure what alternatives you're proposing here 🤷♂ |
Ability to update pip / setuptools / etc inside bootstrapped virtualenv before installing any of the deps. Perhaps an ability to execute arbitrary shell code. |
Definitely no to arbitrary shellcode; ability to do those via virtualenv will be provided; to be fair it already is via the --download flag of virtualenv. |
This should be now possible by setting |
@gaborbernat is there a way to tell tox what version of virtualenv to use? Or do we have to make sure people are running virtualenv 20+ another way? |
You can use the requires key in the configuration.https://tox.readthedocs.io/en/latest/config.html#conf-requires |
Currently it appears tox always installs the latest pip when (re)creating virtualenvs.
However sometimes (like today) the latest version doesn't work, or you haven't yet accounted for breaking changes.
Tox should have a way to control the version of pip.
Perhaps a
pip_version
config property, or allowinginstall_command
to be multiple lines.The text was updated successfully, but these errors were encountered: