What should I clean up, after upgrading my python ...
# development
c
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
šŸŽ‰
w
i think that that might be https://github.com/pantsbuild/pex/issues/1422 ā€¦?
sorry for the trouble.
e
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
Indeed, I get issues with my other venvs and need to recreate them whenever my python version bump a minor too..