安装anaconda及pycharm 启动Jupyter

来源:互联网 发布:安泰管理学院知乎 编辑:程序博客网 时间:2024/05/16 05:46

昨天重装系统之后记录了配置C++环境,今天继续配置Python环境。

这个anaconda好啊 有Jupyyter(一个浏览器界面的python,调试相当方便),具体优势见下面链接

https://www.zhihu.com/question/27615938

一/Anaconda的安装

下载Anaconda安装包,执行以下指令

bash Anaconda-4.3.0-Linux-x86_64.shconda update anaconda

完成上面之后,配置以下环境变量

$ sudo gedit ~/.bashrc      export PATH="/home/liu/anaconda3/bin:$PATH"  export LD_LIBRARY_PATH="/home/liu/anaconda3/lib:$LD_LIBRARY_PATH" 

其实在安装的时候会问你是否添加环境变量


二/Jupyter的启动

jupyter notebook 

返回
[I 15:41:15.999 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret[I 15:41:16.044 NotebookApp] Serving notebooks from local directory: /home/shipeng[I 15:41:16.045 NotebookApp] 0 active kernels [I 15:41:16.045 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=8095a975736780482427676dfe1ff4591f1e1d14c684e141[I 15:41:16.045 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).[C 15:41:16.046 NotebookApp]         Copy/paste this URL into your browser when you connect for the first time,    to login with a token:        http://localhost:8888/?token=8095a975736780482427676dfe1ff4591f1e1d14c684e141/usr/lib/firefox/firefox: /home/liu/anaconda3/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/firefox/firefox)

将上面出现的网址输入到浏览器
http://localhost:8888/?token=8095a975736780482427676dfe1ff4591f1e1d14c684e141
,完成。

上面明显报错了,解决方法如下:

conda install libgcc

 重新输入
jupyter notebook 

三/Pycharm的安装

安装pycharm我主要用来调试tensorflow,用这个比eclipse方便多了有木有!!!

安装Pycharm必选安装JDK,参考我的eclipse的安装。

tar -zxvf pycharm-professor-5.0.4.tar.gz cd pycharm-community-5.0.4/bin/./pycharm.sh 

会弹出注册窗口

server选项里边输入 http://elporfirio.com:1017/就可以了

添加快捷方式

cd /usr/share/applications


/usr/share/applications$ sudo gedit Pycharm.desktop 


[Desktop Entry]Encoding=UTF-8Name=PycharmComment=Pycharm3:The Python IDEExec=sh /home/liu/pycharm-2016.3.3/bin/pycharm.shIcon=/home/liu/pycharm-2016.3.3/bin/pycharm.pngTerminal=falseType=ApplicationCategories=GNOME;Application;Development;StartupNotify=true


cp Pycharm.desktop  ~/Desktop/cd  ~/Desktop/
sudo chmod 777 Pycharm.desktop






1 0
原创粉丝点击