Mac下安装ipython与jupyter
IPython从Python发展而来,更倾向于科学计算。互联网数据分析更喜欢用。
首先切换root用户:
sudo su -
pip3自动安装ipython
yuchaodeMacBook-Pro:~ root# pip3 install ipython
自动安装完成后建立软连接,方便使用
yuchaodeMacBook-Pro:bin root# ln -s /Library/Frameworks/Python.framework/Versions/3.6/bin/ipython /usr/local/bin/
成功安装,执行使用
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 = 8000
5.jupyter notebook --allow-root #启动notebook