路径是断供蟒蛇IPython的? [英] Is path broken for anaconda ipython?

查看:111
本文介绍了路径是断供蟒蛇IPython的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望用IPython的森蚺的分布,但键入 IPython的在终端上产生的错误信息:

I wish to use anaconda distribution of ipython, but typing ipython at the terminal produces an error message:

Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: ipython==0.13.1

添加到PATH 的.bash_profile 如下产生相同的错误消息。问的Python 产生 //蟒蛇/斌/ Python的这IPython的产生的/ usr / local / bin目录/ IPython的。我怎样才能解决这个问题,这样 IPython的启动蟒蛇IPython的?

Adding PATH to .bash_profile as below produces the same error message. Asking which python produces //anaconda/bin/python, and which ipython produces /usr/local/bin/ipython. How can I fix this such that ipython launches anaconda ipython?

# MacPorts Installer addition on 2012-11-03_at_23:50:01: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# Add colors to terminal
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad

# added by Anaconda 1.6.1 installer
export PATH="//anaconda/bin:$PATH"
export PATH=/anaconda//bin/isympy:$PATH

# added to Homebrew: bad command
export PATH=/usr/local/bin:$PATH

更新:我更新了蟒蛇和IPython的使用康达更新的建议,但仍得到相同的错误消息。

Update: I updated anaconda and ipython using conda update as suggested, but still get the same error message.

更新2:感谢所有的建议。我修改的/ usr / local / bin目录/ IPython的如下:

Update 2: Thanks for all the suggestions. I modified /usr/local/bin/ipython as follows:

#!//anaconda/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'ipython==1.1.0','console_scripts','ipython'
__requires__ = 'ipython==1.1.0'
import sys
from pkg_resources import load_entry_point

sys.exit(
   load_entry_point('ipython==1.1.0', 'console_scripts', 'ipython')()
)

现在这IPython的 //产生蟒蛇/斌/ IPython的,而 IPython的启动。

Now which ipython produces //anaconda/bin/ipython, and ipython launches.

推荐答案

一个可能的原因是,有多个 IPython的版本安装例如, BREW 可能安装到的/ usr / local / bin目录康达可能安装到 /蟒蛇/斌(这只是一个猜测)。从类似的问题的建议是,删除所有 IPython的安装完全安装,您将使用的一个。

One possible reason is that there are multiple ipython versions installed e.g., brew might install to /usr/local/bin, conda might install to /anaconda/bin (it is just a guess). The advice from similar issue is to remove all ipython installation completely and install the one that you will use.

这篇关于路径是断供蟒蛇IPython的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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