从〜/ .local / bin / pip而不是/ usr / local / bin / pip运行pip

时间:2018-03-26 08:53:00

标签: python path pip

我想为我的本地用户安装pip 9.0.3 我已经改变了点数路径

$ which -a pip
/efs/home/myuser/.local/bin/pip
/usr/local/bin/pip

$ pip install --upgrade pip --user

Collecting pip
  Using cached pip-9.0.3-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-9.0.3

pip -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg (python 2.7)

如何更改正在使用的点子?

1 个答案:

答案 0 :(得分:0)

我编辑了#! in pip to

#!/usr/bin/env python3.6 

在我使用可用指令here ^的修改版本在我的本地目录中安装python3.6之后。并添加了

export PYTHONPATH=${PYTHONPATH}:${HOME}/.local/bin

到.bash_profile

$ pip -V
pip 9.0.3 from /efs/home/myuser/.local/lib/python3.6/site-packages (python 3.6)

^修改正在配置安装

./configure --prefix=/efs/home/myuser/.local/

我没有做2.安装点子说明。