python pip仍在寻找先前的安装 [英] python pip still looking for previous installation

查看:71
本文介绍了python pip仍在寻找先前的安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遇到sqlite3的这个酿造问题后,我做到了

After experiencing this brew issue with sqlite3, I did

brew rm sqlite python python3

然后

brew install python python3

这安装了python2.7.5作为默认解释器,并且brew与python一起安装了pip,我想我将能够

This installed python2.7.5 as the default interpreter and as brew installs pip along with python, I thought I would be able to

pip install virtualenv

为新的python2.7.5安装virtualenv.但是,我得到

to install virtualenv for the new python2.7.5. However, I'm getting

-bash: /usr/local/share/python/pip: /usr/local/Cellar/python/2.7.3/bin/python: bad interpreter: No such file or directory

我该如何解决/解决此问题?我应该在

How can I get around/fix this? Should I be creating a symlink between

/usr/local/share/python/pip --> /usr/local/Cellar/python/2.7.5/bin/pip-2.7

推荐答案

听起来您的/usr/local/share/python/pip指向的是错误的Python版本.检查该文件的第一行,是否看起来像...

It sounds like your /usr/local/share/python/pip is pointing to the wrong version of Python. Check the first line of that file, and if it looks like...

#!/usr/local/Cellar/python/2.7.3/bin/python

...然后您需要将其更改为指向正确的Python版本.

...then you'll need to change it to point to the correct version of Python.

这篇关于python pip仍在寻找先前的安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆