echo "alias pip='/www/xxx/bin/pip3'" >> ~/.bashrc source ~/.bashrc alias
echo "alias python='/www/xxx/bin/python3'" >> ~/.bashrc source ~/.bashrc alias
pip -V python -V
当输出时,可以看到已经将pip和python解释器指定为我们的对应环境了,这样就可以在指定环境中安装python包和执行python代码了