安装ruby gem时出错

时间:2014-10-07 16:11:54

标签: ruby ipython ipython-notebook anaconda

我正在尝试安装和run iruby。  我使用iruby在终端中运行了iruby,但我收到了:

iruby notebook
/Users/jona/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:38:in ``': No such file or directory - ipython (Errno::ENOENT)
    from /Users/jona/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:38:in `check_version'
    from /Users/jona/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:46:in `run_ipython'
    from /Users/jona/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:18:in `run'
    from /Users/jona/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/bin/iruby:6:in `<top (required)>'
    from /Users/jona/.rbenv/versions/2.0.0-p353/bin/iruby:23:in `load'
    from /Users/jona/.rbenv/versions/2.0.0-p353/bin/iruby:23:in `<main>'

我有installed ipython(我已经安装了Anaconda,但是当我

run conda update conda

conda update ipython

但是说:

command not found: conda

这是一个令人讨厌的程序问题吗?

1 个答案:

答案 0 :(得分:1)

重新作为答案:

问题是Anaconda .../bin目录未在$PATH上,因此无法找到命令ipythonconda

要解决此问题:在主目录中查找名为.profile.bash_profile的文件。这些是默认隐藏的,因此您可能需要做一些额外的事情才能看到它们。在您找到的文件中添加一行PATH="$HOME/anaconda/bin:$PATH"。然后关闭终端并重新打开它,你应该可以运行ipython和conda。您可以使用命令echo $PATH查看PATH的内容。