IPython Notebook Installation

The IPython Notebook is a web-based interactive computational environment where you can combine code execution, text, mathematics, plots and rich media into a single document

pyplot 사용법을 연습하고자 IPython Notebook을 설치했다.

$sudo apt-get install python-pip
$sudo apt-get install python-dev
$sudo pip install "ipython[notebook]"

IPython Notebook에서 다음과 같이 password를 생성한다.

In [1]: from IPython.lib import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

명령행에서 다음 명령어를 실행한다.

$ipython profile create nbserver

생성된 ~/.ipython/profile_nbserver/ipython_notebook_config.py을 수정한다.

# Kernel config
c.IPKernelApp.pylab = 'inline'  # if you want plotting support always
# Notebook config
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:bcd259ccf...[your hashed password here]'
# It is a good idea to put it on a known, fixed port
c.NotebookApp.port = 9999

다음과 같이 IPython Notebook을 실행한다.

$ipython notebook --profile=nbserver

웹 브라우저에서 실행한 컴퓨터의 ip:port 주소로 접근하면 IPython Notebook을 사용할 수 있다.


다음은 matplotlib을 사용해 간단한 그래프를 그린 예제이다.


[1] IPython Notebook, http://ipython.org/index.html
[2] rickumali, stackoverflow, http://stackoverflow.com/questions/25318766/gcc-failed-when-pip-upgrading-pyzmq
[3] 안수찬, IPython Notebook 을 이용한 파이썬 문서화 : 코드레이스 문제 준비하기, https://blog.ansuchan.com/documentation-with-ipython-notebook/
[4] IPython: An Interactive Computing and Development Environment, http://nbviewer.ipython.org/gist/irobii/014b8aa3574090a0d04a#IPython:-An-Interactive-Computing-and-Development-Environment
[5] How to make ipython notebook inline matplotlib graphics, stackoverflow, http://stackoverflow.com/questions/19410042/how-to-make-ipython-notebook-inline-matplotlib-graphics
[6] Running a notebook server, IPython, http://ipython.org/ipython-doc/1/interactive/public_server.html

Tagged with: , ,
Posted in 2) Computer Engineering

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Recent Posts
누적 방문자 수
  • 122,392 hits
%d bloggers like this: