{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#### 在anaconda 环境中运行jupyter notebook\n", "***\n", "***\n", "***\n", "# 问题及其解决方法\n", "***\n", "***\n", "***" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# 在terminal里成功安装第三方的包,结果发现在notebook里无法import\n", "> 这个问题多出现于mac用户,因为mac有一个系统自带的python,成功安装的第三方包都被安装到了系统自带的python里。因此需要确保我们使用的是conda自己的pip,即需要指定pip的路径名,比如我的pip路径名在:/Users/chengjun/anaconda/bin/pip,那么在terminal里输入:\n", "\n", "> /Users/chengjun/anaconda/bin/pip install package_name" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true, "slideshow": { "slide_type": "slide" } }, "source": [ "# 如何查看anaconda自带的包和已经安装的包?\n", "> 打开terminal,输入: conda list" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# windows用户安装graphlab-create出错:unistall tornado, permission denied: tornado/speedup.pdy, 解决方法:\n", "- 首先,卸载tornado:\n", "> conda remove tornado\n", "- 然后,重新运行:\n", "> pip install -U graphlab-create" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# 如何让graphlab在notebook中展示所有的结果(不另外打开新的窗口)\n", "> 运行以下代码" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false, "slideshow": { "slide_type": "slide" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "A newer version of GraphLab Create (v1.9) is available! Your current version is v1.8.5.\n", "\n", "You can use pip to upgrade the graphlab-create package. For more information see https://dato.com/products/create/upgrade.\n" ] } ], "source": [ "import graphlab as gl\n", "from IPython.display import display\n", "from IPython.display import Image\n", "\n", "gl.canvas.set_target('ipynb')" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# 如何卸载一个包\n", "> conda remove package_name" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true, "slideshow": { "slide_type": "slide" } }, "source": [ "# roll back to a specific commit\n", "\n", "#### open the terminal, and cd to your github repo, e.g., \n", "\n", "> cd github/cjc2016\n", "\n", "#### git reset --hard , and if your old-commit-id is 3808166\n", "\n", "> git reset --hard 3808166\n", "\n", "> git push origin HEAD --force\n", "\n", "http://stackoverflow.com/questions/4372435/how-can-i-rollback-a-github-repository-to-a-specific-commit" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# END" ] } ], "metadata": { "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" }, "latex_envs": { "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 0 }, "toc": { "toc_cell": false, "toc_number_sections": true, "toc_threshold": 6, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 0 }