2016-01-16 43 views
1

时使用的是Mac EI Capitan的,我需要安装IPython的和必须使用IPython的笔记本无法在Mac

我用

$ pip install ipython 

安装IPython的安装IPython中,但它返回我

Requirement already satisfied (use --upgrade to upgrade): ipython in /Library/Python/2.7/site-packages 
Requirement already satisfied (use --upgrade to upgrade): traitlets in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): pickleshare in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): decorator in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): gnureadline in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): appnope in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): pexpect in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied (use --upgrade to upgrade): ipython-genutils in /Library/Python/2.7/site-packages (from traitlets->ipython) 
Requirement already satisfied (use --upgrade to upgrade): path.py in /Library/Python/2.7/site-packages (from pickleshare->ipython) 
Requirement already satisfied (use --upgrade to upgrade): ptyprocess>=0.5 in /Library/Python/2.7/site-packages (from pexpect->ipython) 

abhi ~ $ ipython 
-bash: ipython: command not found 

任何想法做错了什么,或者我现在该做什么?

我想这对我的空闲

>>> try: 
    import ipython 
    print "imported" 
except : 
    print "not installed" 

它说没有安装。

+0

IPython的不是bash命令。进入python控制台,你应该可以导入ipython。 – ChaiNunes

+1

@ChaiNunes我在底部编辑了这个问题。我现在应该怎么做?任何线索,我只是变得无方向 – Jasmeet

+0

在macOS塞拉利亚 – neckTwi

回答

1

你可能要考虑安装Anaconda,一个Python发行,其中包括大部分的Python包的科学,数学,工程和数据分析。这可以说是用iPython(现在的Jupyter)笔记本电脑启动和运行的最简单的方法。

+0

相同的问题确定,但我已经安装了几乎所有其他包如科学,数学等 不会安装anaconda效果吗? – Jasmeet

+0

不,我相信它应该导入您已有的任何现有软件包的顶部。这是一个非常强大的安装过程。 – RDJ

+0

你在使用anaconda吗?你用它来进行数据挖掘和其他的东西吗? ipython笔记本完美地工作? – Jasmeet

0

试图在我的Mac上安装IPython中和jupyter时也有类似的问题(埃尔卡皮坦v10.11.6)

尝试了各种组合,包括sudo -H--ignore <whatever people suggested>

唯一为我工作的事情:

pip install --user ipython 
pip install --user jupyter 

您还需要将您的'user python modules'添加到您的路径中。一种方法是使用纳米来编辑你的.bash_profile:

出口PATH = $ PATH:/用户/用户ID /图书馆/ Python的/ 2.7/bin中

然后,只需打开一个新的终端,或者使用source命令将其应用于开放式终端。

你可以找到不同的方法here

希望它有帮助!

+0

我在'Python/2.7'中没有'bin',只有'lib' – neckTwi

+0

你安装了库吗?如果你回答'是'且没有bin文件夹 - 你的箱子里有ipython和jupyter吗?您可以创建一个bin文件夹,因为上面的路径是您的(它在您的用户ID下)并尝试重新安装。 – goggelj

0

试试这个命令:

python -m IPython