-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
tox 3.14.2 uses wrong Python interpreters #1484
Comments
@hynek can you validate this by using PyPi tox 3.14.1? |
I'm not sure if this is the same issue, a related one or a different one, but I've had on my list to look into that in the last few months tox has started to run pypy toxenvs on the wrong Python too -- specifically, now if you run |
is there a sample |
I don't think the tox.ini is the problem. I can only reproduce it if I use Catalina's system Python it seems. |
I don't have access to Catalin yet (our company doesn't allow upgrading to it yet, deah stability) so can't validate fix. When eventually I'll be able to I can try to check out if you have a project that replicates this in a stable fashion. |
@hynek I'm 99% this was pypa/virtualenv#1704 |
@gaborbernat I don't think so, |
yes I can still reproduce:
(venv3) asottile-mac:y asottile$ /Users/asottile/Library/Python/3.7/bin/tox -rvv
using tox.ini: /private/tmp/y/tox.ini (pid 90128)
removing /private/tmp/y/.tox/log
using tox-3.14.6 from /Users/asottile/Library/Python/3.7/lib/python/site-packages/tox/__init__.py (pid 90128)
skipping sdist step
py37 start: getenv /private/tmp/y/.tox/py37
py37 cannot reuse: -r flag
py37 recreate: /private/tmp/y/.tox/py37
py37 uses /usr/local/opt/python/bin/python3.7
removing /private/tmp/y/.tox/py37
setting PATH=/private/tmp/y/.tox/py37/bin:/private/tmp/y/venv3/bin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[90130] /private/tmp/y/.tox$ /usr/local/opt/python/bin/python3.7 -m virtualenv --no-download --python /usr/local/opt/python/bin/python3.7 py37
created virtual environment CPython3.7.7.final.0-64 in 298ms
creator CPython3Posix(dest=/private/tmp/y/.tox/py37, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/asottile/Library/Application Support/virtualenv/seed-app-data/v1.0.1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
py37 finish: getenv /private/tmp/y/.tox/py37 after 0.72 seconds
py37 start: finishvenv
write config to /private/tmp/y/.tox/py37/.tox-config1 as '72f04ae20581db472afbb800b418eeabc5a0b2df5b89e9fb162567cb361519c9 /usr/local/opt/python/bin/python3.7\n3.14.6 0 0 0'
py37 finish: finishvenv after 0.00 seconds
py37 start: envreport
setting PATH=/private/tmp/y/.tox/py37/bin:/private/tmp/y/venv3/bin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[90132] /private/tmp/y$ /private/tmp/y/.tox/py37/bin/python -m pip freeze >.tox/py37/log/py37-0.log
py37 finish: envreport after 0.60 seconds
py37 installed:
py37 start: run-test-pre
py37 run-test-pre: PYTHONHASHSEED='3851750361'
py37 finish: run-test-pre after 0.00 seconds
py37 start: run-test
py37 run-test: commands[0] | python --version
setting PATH=/private/tmp/y/.tox/py37/bin:/private/tmp/y/venv3/bin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[90133] /private/tmp/y$ /private/tmp/y/.tox/py37/bin/python --version
Python 3.7.7
py37 finish: run-test after 0.01 seconds
py37 start: run-test-post
py37 finish: run-test-post after 0.00 seconds
py38 start: getenv /private/tmp/y/.tox/py38
py38 cannot reuse: -r flag
py38 recreate: /private/tmp/y/.tox/py38
python3.8 (/private/tmp/y/venv3/bin/python3.8) is {'executable': '/usr/local/Cellar/python/3.7.7/bin/python3.7', 'name': 'python', 'version_info': [3, 8, 0, 'final', 0], 'version': '3.8.0 (default, Jan 13 2020, 10:45:48) \n[Clang 10.0.1 (clang-1001.0.46.4)]', 'is_64': True, 'sysplatform': 'darwin'}
py38 uses /usr/local/Cellar/python/3.7.7/bin/python3.7
removing /private/tmp/y/.tox/py38
setting PATH=/private/tmp/y/.tox/py38/bin:/private/tmp/y/venv3/bin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[90136] /private/tmp/y/.tox$ /usr/local/opt/python/bin/python3.7 -m virtualenv --no-download --python /usr/local/Cellar/python/3.7.7/bin/python3.7 py38
created virtual environment CPython3.7.7.final.0-64 in 295ms
creator CPython3Posix(dest=/private/tmp/y/.tox/py38, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/asottile/Library/Application Support/virtualenv/seed-app-data/v1.0.1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
py38 finish: getenv /private/tmp/y/.tox/py38 after 0.69 seconds
py38 start: finishvenv
write config to /private/tmp/y/.tox/py38/.tox-config1 as '72f04ae20581db472afbb800b418eeabc5a0b2df5b89e9fb162567cb361519c9 /usr/local/Cellar/python/3.7.7/bin/python3.7\n3.14.6 0 0 0'
py38 finish: finishvenv after 0.00 seconds
py38 start: envreport
setting PATH=/private/tmp/y/.tox/py38/bin:/private/tmp/y/venv3/bin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[90138] /private/tmp/y$ /private/tmp/y/.tox/py38/bin/python -m pip freeze >.tox/py38/log/py38-0.log
py38 finish: envreport after 0.59 seconds
py38 installed:
py38 start: run-test-pre
py38 run-test-pre: PYTHONHASHSEED='3851750361'
py38 finish: run-test-pre after 0.00 seconds
py38 start: run-test
py38 run-test: commands[0] | python --version
setting PATH=/private/tmp/y/.tox/py38/bin:/private/tmp/y/venv3/bin:/usr/local/opt/findutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[90139] /private/tmp/y$ /private/tmp/y/.tox/py38/bin/python --version
Python 3.7.7
py38 finish: run-test after 0.01 seconds
py38 start: run-test-post
py38 finish: run-test-post after 0.00 seconds
___________________________________ summary ____________________________________
py37: commands succeeded
py38: commands succeeded
congratulations :) |
This also updates the tox minversion to a very recent version in hopes of triggering tox provisioning, which seems to avoid tox-dev/tox#1484
This also updates the tox minversion to a very recent version in hopes of triggering tox provisioning, which seems to avoid tox-dev/tox#1484
This is intended to remedy these two github issues: tox-dev#882 tox-dev#1484
(Do NOT use basepython as a fallback) This is intended to remedy these two github issues: tox-dev#882 tox-dev#1484 by :user: jackdesert
(Do NOT use basepython as a fallback) This is intended to remedy these two github issues: tox-dev#882 tox-dev#1484 by :user: jackdesert
If tox keeps using the wrong python interpreter, make sure you are specifying interpreters WITHOUT PERIODS. See this comment: |
I ran into this as well, tox picks up my default system python if it can't find the right Python. This is confusing I would prefer an error from tox saying it can't make a venv with the right Python instead of making a venv with my systems Python 2.7 cause that's just hella confusing. |
Looks like I am also affected for the first time, though it is a little bit more complicated as containers are involved: |
Can someone throw together a docker image to replicate the issue? Then we can move ahead. |
Closing this until we have a replicate of this via a Docker image, thanks! |
I just wanted to say I came here and had the same issue, but it was because my python versions were specified as e.g |
This also updates the tox minversion to a very recent version in hopes of triggering tox provisioning, which seems to avoid tox-dev/tox#1484
This also updates the tox minversion to a very recent version in hopes of triggering tox provisioning, which seems to avoid tox-dev/tox#1484
When trying to run a tox env using Python 3.8, it actually uses 3.7 (concretely the system interpreter).
I only noticed it because I used hashes in my lockfiles and my builds started failing due to a lack of a hash to dependency that is need on 3.7 but not on 3.8.
Downgrading to homebrew's 3.14.1 fixes it.
tox -rvv
:Please note:
which leads to:
Please also note that Python 3.8 is the Python interpreter in the active virtualenv (but tox is not ran out of that virtualenv. It uses the Catalina system 3.7 installed using pipx). IOW it uses the tox interpreter, so I suspect a connection here (homebrew's tox also uses 3.7, just not the system's).
Could this be related to #1462?
The text was updated successfully, but these errors were encountered: