https://pantsbuild.org/ logo
c

curved-television-6568

08/28/2021, 11:47 AM
What should I clean up, after upgrading my python version?
I used to have 3.8, but brew updated me to 3.9.. so now I get:
Copy code
E   ImportError: dlopen(/Users/x/.cache/pants/named_caches/pex_root/venvs/c784a17755d488a7cc21410ee950e49f33758276/079408cd75c23348f86c661268b461cd062f6aad/lib/python3.8/site-packages/setproctitle.cpython-38-darwin.so, 2): Symbol not found: _Py_GetArgcArgv
E     Referenced from: /Users/x/.cache/pants/named_caches/pex_root/venvs/c784a17755d488a7cc21410ee950e49f33758276/079408cd75c23348f86c661268b461cd062f6aad/lib/python3.8/site-packages/setproctitle.cpython-38-darwin.so
E     Expected in: flat namespace
E    in /Users/x/.cache/pants/named_caches/pex_root/venvs/c784a17755d488a7cc21410ee950e49f33758276/079408cd75c23348f86c661268b461cd062f6aad/lib/python3.8/site-packages/setproctitle.cpython-38-darwin.so
when running a pants test..
I guess I could wipe the pants cache dir
~/.cache/pants
but it would be nice if this was handled for me, I suppose.. šŸ˜‰
Ah, some one expects a py3.8 to be present, it seems..
Copy code
13:53:05.64 [WARN] Completed: test - src/python/pants/backend/docker/docker_build_digest_test.py:tests failed (exit code 127).
env: python3.8: No such file or directory
Ok, in goes
pyenv
I guess.. šŸ˜›
And, profit! šŸ˜„
Copy code
āœ“ src/python/pants/backend/docker/docker_binary_test.py:tests succeeded.
āœ“ src/python/pants/backend/docker/docker_build_digest_test.py:tests succeeded.
āœ“ src/python/pants/backend/docker/docker_build_integration_test.py:tests succeeded.
āœ“ src/python/pants/backend/docker/docker_build_test.py:tests succeeded.
āœ“ src/python/pants/backend/docker/tailor_test.py:tests succeeded.
h

happy-kitchen-89482

08/28/2021, 5:15 PM
šŸŽ‰
w

witty-crayon-22786

08/28/2021, 6:02 PM
i think that that might be https://github.com/pantsbuild/pex/issues/1422 ā€¦?
sorry for the trouble.
e

enough-analyst-54434

08/28/2021, 6:52 PM
It can't be that issue because that issue only affects Pex 2.1.46 which Pants doesn't use ... because of that issue. Working on it! @curved-television-6568 I think that's because we don't tell Pex
--venv-copies
. That would freeze in the python binary at the time we create venvs for tools instead of having a symlink out to the system binary picked. Of course - at the expense of each tool venv gaining size-of-python-exe.
IOW - I think this is a generic venv issue if you don't ask for copies.
I'm pretty sure this very issue is one of a cluster of issues that led to the pdm creator writing up PEP 582.
šŸ‘ 1
c

curved-television-6568

08/28/2021, 8:25 PM
Indeed, I get issues with my other venvs and need to recreate them whenever my python version bump a minor too..