ipython:在OSX上找不到命令 [英] ipython: command not found on OSX

查看:156
本文介绍了ipython:在OSX上找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我前段时间在OSX上安装了python科学环境(numpy,scipy,matplotlib,pandas,ipython)使用brew和pip或easy_install(或者其中2个,我不记得了)。现在,如果尝试运行ipython,我会得到:

I installed the python scientific environment (numpy, scipy, matplotlib, pandas, ipython) a while ago on OSX using brew and either pip or easy_install (or the 2 of them, I don't remember). Now if try to run ipython I get:

-> ipython
-bash: ipython: command not found

然后我做了:

-> sudo find . -iname "*ipython*"
Password:
find: ./dev/fd/3: Not a directory
find: ./dev/fd/4: Not a directory
./Users/jfk/.ipython
./usr/local/Cellar/matplotlib/1.2.0/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_console_highlighting.py
./usr/local/Cellar/matplotlib/1.2.0/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_console_highlighting.pyc
./usr/local/Cellar/matplotlib/1.2.0/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_directive.py
./usr/local/Cellar/matplotlib/1.2.0/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_directive.pyc
./usr/local/Cellar/matplotlib/1.2.1/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_console_highlighting.py
./usr/local/Cellar/matplotlib/1.2.1/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_console_highlighting.pyc
./usr/local/Cellar/matplotlib/1.2.1/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_directive.py
./usr/local/Cellar/matplotlib/1.2.1/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_directive.pyc
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/doc/ipython
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/doc/ipython/examples/core/ipython-get-history.py
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/doc/ipython/examples/core/ipython-qtconsole.desktop
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/doc/ipython/examples/core/ipython-sh.desktop
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/doc/ipython/examples/core/ipython.desktop
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/doc/ipython/examples/core/ipython_here_shell_extension.reg
./usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/share/man/man1/ipython.1
./usr/local/lib/python2.7/site-packages/IPython
./usr/local/lib/python2.7/site-packages/IPython/config/profile/cluster/ipython_config.py
./usr/local/lib/python2.7/site-packages/IPython/config/profile/cluster/ipython_config.pyc
./usr/local/lib/python2.7/site-packages/IPython/config/profile/math/ipython_config.py
./usr/local/lib/python2.7/site-packages/IPython/config/profile/math/ipython_config.pyc
./usr/local/lib/python2.7/site-packages/IPython/config/profile/pysh/ipython_config.py
./usr/local/lib/python2.7/site-packages/IPython/config/profile/pysh/ipython_config.pyc
./usr/local/lib/python2.7/site-packages/IPython/config/profile/sympy/ipython_config.py
./usr/local/lib/python2.7/site-packages/IPython/config/profile/sympy/ipython_config.pyc
./usr/local/lib/python2.7/site-packages/IPython/frontend/html/notebook/static/codemirror/README-IPython.rst
./usr/local/lib/python2.7/site-packages/IPython/frontend/html/notebook/static/codemirror/theme/ipython.css
./usr/local/lib/python2.7/site-packages/IPython/frontend/qt/console/ipython_widget.py
./usr/local/lib/python2.7/site-packages/IPython/frontend/qt/console/ipython_widget.pyc
./usr/local/lib/python2.7/site-packages/IPython/frontend/qt/console/resources/icon/IPythonConsole.svg
./usr/local/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
./usr/local/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.pyc
./usr/local/lib/python2.7/site-packages/ipython-0.13.2-py2.7.egg-info
./usr/local/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_console_highlighting.py
./usr/local/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_console_highlighting.pyc
./usr/local/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_directive.py
./usr/local/lib/python2.7/site-packages/matplotlib/sphinxext/ipython_directive.pyc
./usr/local/share/python/ipython

我很惊讶没有看到任何/ bin可怕ctory。

I was surprised not to see any /bin directory.

然后我尝试重新安装ipython

Then I tried to reinstall ipython

-> pip install ipython
Requirement already satisfied (use --upgrade to upgrade): ipython in /usr/local/lib/python2.7/site-packages
Cleaning up...

这真令人困惑。任何想法都是受欢迎的。

This is really confusing. Any idea is welcome.

推荐答案

在你的创建 .pydistutils.cfg $ HOME 以下内容

[global]
verbose=1

[install]
install-scripts=$HOME/bin

[easy_install]
install-scripts=$HOME/bin

运行

pip install -U --user --force ipython  

看看 https://github.com/pypa/pip/issues/426

这篇关于ipython:在OSX上找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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