Mac下安裝ipython與jupyter

IPython從Python發展而來,更傾向於科學計算。互聯網數據分析更喜歡用。python

首先切換root用戶:spa

sudo su -

pip3自動安裝ipythoncode

yuchaodeMacBook-Pro:~ root# pip3 install ipython

自動安裝完成後創建軟鏈接,方便使用orm

yuchaodeMacBook-Pro:bin root# ln -s /Library/Frameworks/Python.framework/Versions/3.6/bin/ipython /usr/local/bin/

成功安裝,執行使用blog

yuchaodeMacBook-Pro:bin root# ipython 
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: name = 'chaoge'

In [2]: name
Out[2]: 'chaoge'

In [3]: 

 安裝jupyter notebook

1.激活虛擬環境venv
2. pip3 install ipython
  pip3 install jupyter
3. ipython進入
  from IPython.lib import passwd
  passwd()#生成密碼
4.jupyter notebook --generate-config --allow-root

c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'sha1:4d75995b2f75:c08ada6f31047fe429d0b24652f8fbc81ec32a7c'
c.NotebookApp.port = 8000ip

5.jupyter notebook  --allow-root  #啓動notebook
相關文章
相關標籤/搜索