参考:https://zhuanlan.zhihu.com/p/21441838?refer=intelligentunit
1,
cd assignment1
sudo pip install virtualenv # This may already be installed
virtualenv .env # Create a virtual environment
source .env/bin/activate # Activate the virtual environment
pip install -r requirements.txt # Install dependencies
# Work on the assignment for a while ...
#deactivate
2,下载数据
cd cs231n/datasets
./get_datasets.sh
3,run
source .env/bin/activate
in your assignment folder.
4,执行
jupyter notebook
error:execution error: “”http://localhost:8888/tree“”不理解“open location”信息。 (-1708)
解决:
在Jupyter的配置目录
cd ~/.jupyter
下面新建一个文件,名称是:
touch jupyter_notebook_config.py
open jupyter_notebook_config.py
在这个文件里面加入3行代码:
c.NotebookApp.browser = u’Safari’
c.NotebookApp.token = ”
c.NotebookApp.password = ”
再执行jupyter notebook
macox会报错:RuntimeError: Python is not installed as a framework.
解决:原文作业页面给出来了,先退出jupyter notebook,然后:
sh start_ipython_osx.sh
在jupyter notebook中有很多的cell,shift+enter可以运行鼠标点的cell,所有cell变量共享