我是新手,我需要为我的项目使用pySerial和feedparser模块。我正在跑狮子山。未找到Python pip安装模块。如何将python链接到pip位置?
我按照以下教程,以便我可以升级到python 2.7.3,然后使用上述模块。
http://hackercodex.com/guide/python-virtualenv-on-mac-osx-mountain-lion-10.8/
我跟着这个教程,直到我安装点子。而不是安装Virtualenv。我使用以下命令安装pySerial和feedparser
$ pip install pySerial
Requirement already satisfied (use --upgrade to upgrade): pySerial in /Library/Python/2.7/site-packages
Cleaning up...
我认为这已经存在并检查它。 Python似乎正在导入这很好。我的python版本已经升级到2.7.3 btw,因为我使用教程中提到的自制软件安装了它。
然后我试图安装feedparser
$ pip install feedparser
Requirement already satisfied (use --upgrade to upgrade): feedparser in /usr/local/lib/python2.7/site-packages
Cleaning up...
通知其在USR/local/lib目录的site-packages目录如何。
我所有的pip安装都安装在该目录中,但是当我尝试导入它们时,python似乎没有选择它们。
如何设置路径,使python也看起来那里以及核心目录?
您的帮助将不胜感激。
我试图寻找答案在这里: Pip installs but module is not found Why I can't import beautifulsoup on mac using python 2.7 after installing it by using pip and/or easy_install?
但niether都是在同样的情况,因为我。我不明白为什么会这样,因为我通过自制软件编辑我的.bash_profile具有以下
# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
然后安装自制软件,然后安装蟒蛇2.7.3(2.7.3现在目前我的机器上运行)
我觉得所有的pip安装都会正确关联?
这对我的作品。你能简单解释一下吗? Thx – GilbertLee 2014-07-03 11:32:44