ipython 프로필 설정하기

CODEDRAGON Development/Python

반응형


 

 

ipython 프로필 설정하기

분석에 필요한 프로필의 스타트업 파일과 설정파일입니다.


 

 

에러 메시지

00.py, ipython_config.py 파일에 관련 설정을 하지 않으면 ipython 실행시 NameError 발생합니다.

 

NameError: name 'mpl' is not defined

C:\CodeLab>ipython

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) 

[MSC v.1900 64 bit (AMD64)]

Type 'copyright', 'credits' or 'license' for more information

IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-1-7b5a313b10ca> in <module>()

----> 1 mpl.rc('font', family='nanumgothic')

 

NameError: name 'mpl' is not defined

---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-1-5a35dec29207> in <module>()

----> 1 mpl.rc('axes', unicode_minus=False)

 

NameError: name 'mpl' is not defined

---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-1-bfa7b61be100> in <module>()

----> 1 mpl.rc('figure', figsize=(8, 5))

 

NameError: name 'mpl' is not defined

---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-1-061abc676ede> in <module>()

----> 1 mpl.rc('figure', dpi=300)

 

NameError: name 'mpl' is not defined

 

In [1]:


 

 

 

 

해결방법

다운 받은 파일을 아래 경로에 저장합니다. 또는 다운 받은 파일의 내용을 복사한 기존 파일에 추가해줍니다.

 

 

ipython_config.py

리눅스

/home/[사용자명]/.ipython/profile_default/ipython_config.py

윈도우

C:\Users\[사용자명]\.ipython\profile_default\ipython_config.py

 


 

 

00.py

리눅스

/home/[사용자명]/.ipython/profile_default/startup/00.py

윈도우

C:\Users\[사용자명]\.ipython\profile_default\startup\00.py

 


 

 

 

 

직접 다운로드

00.py

ipython_config.py

 



반응형

'Development > Python' 카테고리의 다른 글

Data Structures  (0) 2018.06.09
install jupyter  (0) 2018.06.08
10 Minutes to pandas  (0) 2018.06.05
dict 사용 - dict 특정 요소 참조, 특정 요소 삭제  (0) 2018.05.28
튜플(tuple)의 사용 용도  (0) 2018.05.07