Mac OS 10.10上的ipython - 找不到命令 [英] ipython on MacOS 10.10 - command not found
问题描述
我正在努力让ipython在Mac OS 10.10中运行。
问题:
$ ipython
返回
-bash:ipython:找不到命令
context:
我在MacOS 10.10上运行python2.7。我通过brew安装了python。一些信息:
哪个python
=
/ usr / local / bin / python
brew info python
=
python:stable 2.7.10(瓶装),HEAD
解释的,交互式的,面向对象的编程语言
https://www.python.org
/usr/local/Cellar/python/2.7.10_2(4977 files,77M)*
安装ipython我跑了
pip install ipython [all]
so ... pip show ipython =
---
元数据 - 版本:2.0
名称:ipython
版本:4.0.0
摘要:IPython:高效互动计算
主页:http://ipython.org
作者:IPython开发团队
作者电子邮件:ipython-dev@scipy.org
许可证:BSD
地点:/usr/local/lib/python2.7/site-packages
需要:traitlets,pickleshare, simplegeneric,decorator,gnureadline,ap pnope,pexpect
最后, echo $ PATH =
/ Users / [username] / depot_tools:/ usr / local:/ usr / local / lib:/ Users / [用户名] /depot_tools:/usr/local:/usr/local/lib:/usr/local/lib/python2.7/site-packages:/Users/ [用户名] / depot_tools:在/ usr /本地:在/ usr /本地/ lib目录下:在/ usr /本地/ GIT中/电流/斌:在/ usr / local / bin目录:在/ usr / bin中:/ bin中:在/ usr / local / sbin中:/ usr / sbin目录:/ sbin目录中:/ opt / X11 / bin中
谁能告诉我我做错了什么?
我遇到了同样的问题,但已经解决了。您需要首先通过终端上的命令确保安装IPython。
$ python -m IPython
然后它会显示以下结果:
恭喜!您的计算机上有IPython。
然后在终端上运行此命令。
alias ipython ='python -m IPython'
最后你可以再次尝试ipython命令。 / p>
您可以将此命令行添加到〜/ .bash_profile 文件中以获取永久性。
它适用于我。
I'm trying to get ipython working in Mac OS 10.10.
problem:
$ ipython
returns
-bash: ipython: command not found
context:
I'm running python2.7 on MacOS 10.10. I installed python via brew. Some info:
which python
=
/usr/local/bin/python
brew info python
=
python: stable 2.7.10 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org
/usr/local/Cellar/python/2.7.10_2 (4977 files, 77M) *
To install ipython I ran
pip install ipython[all]
so... pip show ipython =
---
Metadata-Version: 2.0
Name: ipython
Version: 4.0.0
Summary: IPython: Productive Interactive Computing
Home-page: http://ipython.org
Author: The IPython Development Team
Author-email: ipython-dev@scipy.org
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: traitlets, pickleshare, simplegeneric, decorator, gnureadline, appnope, pexpect
finally, echo $PATH =
/Users/[username]/depot_tools:/usr/local:/usr/local/lib:/Users/[username]/depot_tools:/usr/local:/usr/local/lib:/usr/local/lib/python2.7/site-packages:/Users/[username]/depot_tools:/usr/local:/usr/local/lib:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/X11/bin
Can anyone tell me what I'm doing wrong?
I met the same issue but resolved. You need to make sure install IPython at first via this command on terminal.
$python -m IPython
Then it will show this result:
Congratulations! You had IPython in your computer.
Then run this command on terminal.
alias ipython='python -m IPython'
Finally you can try ipython command again.
You can add this command line into ~/.bash_profile file for permanent. It works fine for me.
这篇关于Mac OS 10.10上的ipython - 找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!