LoginSignup
4
2

More than 5 years have passed since last update.

UbuntuでIPythonがcommand not found

Posted at

環境

  • Ubuntu 15.10
  • Python 2.7
  • Pip 1.5.6
  • IPython 5.1.0

問題

$ pip install ipython

でIPythonをインストールしたが、

$ ipython
zsh: command not found: ipython

解決策

python起動時に-mでオプションをつけると動いた。

$ python -m IPython
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]:

なので.zshrcにaliasを書いて解決

.zshrc
alias ipython='python -m IPython'
4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2