pyenv: pip: command not found

≯℡__Kan透↙ 提交于 2019-12-04 02:54:39
Rémi Becheras

You need to install pip separately if you didn't install pyenv from the binaries provided by python.org

After installing the wanted python version, download and install pip :

wget https://bootstrap.pypa.io/get-pip.py
(sudo) python ./get-pip.py​
rm get-pip.py

Ref: https://pip.pypa.io/en/stable/installing/

I had the same error message. The problem was due to a failed installation of a python version, so pip wasn't found for this version. In fact, even python wasn't found.

example:

pyenv install 3.7.2 # this failed, but I did not realize it failed at first
pyenv versions | grep 3.7.2

3.7.2

pyenv local 3.7.2
python --version

pyenv: python: command not found

So problem was not with pip itself, but a broken installation of a python version. Just make sure you succeed when you install a python version with pyenv.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!