pyenv-virtualenv: Segmentation fault when using any pip command in 3.6.15
while using any pip command I’m getting
/home/neurlap/.pyenv/plugins/pyenv-pip-rehash/libexec/pip: line 20: 24753 Segmentation fault (core dumped) "$PYENV_COMMAND_PATH" "$@"
@native-api any help?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (4 by maintainers)
Solution:
I have found a working temporary fix from this french site to fix the issue you can comment this line in the file
/home/johackim/.pyenv/versions/3.7.0/bin/pip3.7
There is a solution (tested on ubuntu 22.04):
cat alignment.patch
pyenv install --patch 3.6.8 < alignment.patch
Error 139 When Installing Python 3.6 on Fedora 34
https://giters.com/pyenv/pyenv/issues/1889
This worked for me aswell.
In Ubuntu 21.10, I downloaded Python 3.6.15 from python.org, manually compiled and installed. It was enough to run “import ctypes” in python shell to crash it with seg. fault. That’s also why pip was crashing. So, it doesn’t seem to be related with pyenv.
Tried same steps in a Docker container on a Ubuntu 20.04 host but it didn’t crash.
in case you are using fedora:
source: https://giters.com/pyenv/pyenv/issues/1889
It’s happening on manjaro.
On Sat, Oct 23, 2021, 5:55 PM Evren Esat Özkan @.***> wrote:
I’m getting the same error, but with the included
pip-rehash
:/home/username/.pyenv/pyenv.d/exec/pip-rehash/pip: line 20: 43331 Segmentation fault (core dumped) "$PYENV_COMMAND_PATH" "$@"
Somehow I managed to fix itby not providing a name for the virtualenv I’m creating. So this ends up with pip/python mismatch and seg.fault:But this one works:
Not sure if
-f
helps or not, I stopped experimenting after solving my problem.Edit: I was wrong, when I don’t provide a name, it incorrectly creates the environment using Python 3.10 then the pip matches with the python.
click to see the debug output, in case if it helps
stil happen in ubuntu 22.04 (default python3.10) and pyenv 2.2.5 and latest pyenv-virtualenv !
first time every thing ok.
out and go into again jsut justdump
/home/wilson/local/pyenv/pyenv.d/exec/pip-rehash/pip:line 20: 2975264 coredump .....xxx. "$PYENV_COMMAND_PATH" "$@"
https://github.com/pyenv/pyenv/pull/2630 has likely fixed this for 3.5.10 and 3.6.15. It’s an upstream problem that was fixed in 3.7+. Since the former are EOL, they didn’t backport that patch further.
If you create the venv without a name it works fine as the previous comment said:
pyenv virtualenv -f 3.6.15
It says we don’t need to install this plugin anymore. It comes with pyenv-virtualenv