Python 3.9 → 3.10 breaks installation of new packages and running of current packages
Describe the bug
- I had Python 3.9 and upgraded to Python 3.10 with
pacman - Many things fail to work now
Installing new packages:
pipx >(setup:729): pipx version is 1.0.0
pipx >(setup:730): Default python interpreter is '/usr/bin/python'
pipx >(package_name_from_spec:323): Determined package name: yt-dlp
pipx >(package_name_from_spec:324): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:172): running /usr/bin/python -m venv --without-pip /home/matt/.local/pipx/venvs/yt-dlp
pipx >(run_subprocess:172): running /home/matt/.local/pipx/venvs/yt-dlp/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:172): running /home/matt/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:172): running /home/matt/.local/pipx/venvs/yt-dlp/bin/python --version
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: yt-dlp
installing yt-dlp...
pipx >(run_subprocess:172): running /home/matt/.local/pipx/venvs/yt-dlp/bin/python -m pip install yt-dlp
pipx >(subprocess_post_check_handle_pip_error:334): '/home/matt/.local/pipx/venvs/yt-dlp/bin/python -m pip install yt-dlp' failed
pipx >(subprocess_post_check_handle_pip_error:351): Fatal error from pip prevented installation. Full pip output in file:
/home/matt/.local/pipx/logs/cmd_2022-01-18_17.18.26_pip_errors.log
pipx >(rmdir:55): removing directory /home/matt/.local/pipx/venvs/yt-dlp
Error installing yt-dlp.
/home/matt/.local/pipx/logs/cmd_2022-01-18_17.18.26_pip_errors.log
PIP STDOUT
----------
PIP STDERR
----------
/home/matt/.local/pipx/venvs/yt-dlp/bin/python: No module named pip
Running previously installed packages
> pipx list
venvs are in /home/matt/.local/pipx/venvs
apps are exposed on your $PATH at /home/matt/.local/bin
package poetry 1.1.4, installed using Python 3.9.1
- poetry
> poetry -V
Traceback (most recent call last):
File "/home/matt/.local/bin/poetry", line 5, in <module>
from poetry.console import main
ModuleNotFoundError: No module named 'poetry'
How to reproduce I suspect there's something weird going on here with my upgrade, but I'm not sure how to reproduce beyond upgrade one's python version. Possible related to #723? As that's the error I get when installing a local package.
> python -V
3.10.1
> pipx -V
1.0.0
> pip -V
pip 20.3.4 from /usr/lib/python3.10/site-packages/pip (python 3.10)
@Mattwmaster58 Could you try the solutions in #791?
Nuked pipx/shared as directed in https://github.com/pypa/pipx/issues/791#issuecomment-1005645899, seems to be working again, thanks! Is there a benefit to keeping this open to track this?
Had the same error, #791 helped me fix mine too.
Deleting the shared folder un-broke the pipx command for me, but then running pipx reinstall-all wiped all of the venvs/binaries installed via pipx. I had to grep through the pipx logs to find everything I had installed and reinstall by hand.