Linux中anaconda以及Jupyter的安装与使用
【摘要】 Jupyter笔记本对于开发者是非常方便的,可以直接进行运行查看问题
1.安装anaconda
- 首先在anaconda官网下载linux环境下的python
- 安装anaconda,cd 文件所在目录并执行如下命令:
bash Anaconda3-2021.05-Linux-x86_64.sh
在安装过程中一直选择默认即可。
-
装完之后,运行python,此时仍是ubuntu自带的python信息,因此要使用anaconda,则需自己设置环境变量,修改profile文件 输入命令:sudo gedit /etc/profile,打开profile文件。
-
在文件末尾添加一行:export PATH=/home/下载/python/bin:$PATH,其中,将“/home/下载/python/bin”替换为你实际的安装路径,保存。
-
重启linux
-
打开终端,输入python,如果出现如下界面,表明设置成功
2. 相关操作
2.1 查找文件位置
whereis pycharm
2.2 压缩包的安装
tar -xvzf 压缩包的名称
2.3 pycharm的启动
1.cd 到解压完成的文件夹里面
2.找到 .sh启动文件
3. sh .sh的文件即可启动程序
2.4 添加软件图标到桌面
- 创建pycharm.desktop文件到/usr/share/applications/目录下 touch /usr/share/applications/pycharm.desktop
- 执行命令:sudo vim /usr/share/applications/pycharm.desktop 输入管理员密码
- 编辑pycharm.desktop 添加:(Exec 需要写入的是.sh文地址 Icon需要写入的是.png的地址)
- 保存文件并退出
3. 在linux系统安装jupyter
pip install jupyter
在jupyter笔记本打开文件以后要是想使用幻灯片模式安装rise插件
pip install rise
我们安装成功以后如下图所示即为安装成功
Collecting rise
Downloading rise-5.7.1-py2.py3-none-any.whl (4.3 MB)
|████████████████████████████████| 4.3 MB 446 kB/s
Requirement already satisfied: notebook>=6.0 in ./下载/python/lib/python3.8/site-packages (from rise) (6.3.0)
Requirement already satisfied: jupyter-client>=5.3.4 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (6.1.12)
Requirement already satisfied: tornado>=6.1 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (6.1)
Requirement already satisfied: Send2Trash>=1.5.0 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (1.5.0)
Requirement already satisfied: ipython-genutils in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (0.2.0)
Requirement already satisfied: argon2-cffi in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (20.1.0)
Requirement already satisfied: nbconvert in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (6.0.7)
Requirement already satisfied: pyzmq>=17 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (20.0.0)
Requirement already satisfied: prometheus-client in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (0.10.1)
Requirement already satisfied: traitlets>=4.2.1 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (5.0.5)
Requirement already satisfied: terminado>=0.8.3 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (0.9.4)
Requirement already satisfied: jupyter-core>=4.6.1 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (4.7.1)
Requirement already satisfied: ipykernel in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (5.3.4)
Requirement already satisfied: nbformat in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (5.1.3)
Requirement already satisfied: jinja2 in ./下载/python/lib/python3.8/site-packages (from notebook>=6.0->rise) (2.11.3)
Requirement already satisfied: python-dateutil>=2.1 in ./下载/python/lib/python3.8/site-packages (from jupyter-client>=5.3.4->notebook>=6.0->rise) (2.8.1)
Requirement already satisfied: six>=1.5 in ./下载/python/lib/python3.8/site-packages (from python-dateutil>=2.1->jupyter-client>=5.3.4->notebook>=6.0->rise) (1.15.0)
Requirement already satisfied: ptyprocess in ./下载/python/lib/python3.8/site-packages (from terminado>=0.8.3->notebook>=6.0->rise) (0.7.0)
Requirement already satisfied: cffi>=1.0.0 in ./下载/python/lib/python3.8/site-packages (from argon2-cffi->notebook>=6.0->rise) (1.14.5)
Requirement already satisfied: pycparser in ./下载/python/lib/python3.8/site-packages (from cffi>=1.0.0->argon2-cffi->notebook>=6.0->rise) (2.20)
Requirement already satisfied: ipython>=5.0.0 in ./下载/python/lib/python3.8/site-packages (from ipykernel->notebook>=6.0->rise) (7.22.0)
Requirement already satisfied: pexpect>4.3 in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (4.8.0)
Requirement already satisfied: setuptools>=18.5 in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (52.0.0.post20210125)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (3.0.17)
Requirement already satisfied: pickleshare in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (0.7.5)
Requirement already satisfied: backcall in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (0.2.0)
Requirement already satisfied: jedi>=0.16 in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (0.17.2)
Requirement already satisfied: decorator in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (5.0.6)
Requirement already satisfied: pygments in ./下载/python/lib/python3.8/site-packages (from ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (2.8.1)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in ./下载/python/lib/python3.8/site-packages (from jedi>=0.16->ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (0.7.0)
Requirement already satisfied: wcwidth in ./下载/python/lib/python3.8/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=5.0.0->ipykernel->notebook>=6.0->rise) (0.2.5)
Requirement already satisfied: MarkupSafe>=0.23 in ./下载/python/lib/python3.8/site-packages (from jinja2->notebook>=6.0->rise) (1.1.1)
Requirement already satisfied: bleach in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (3.3.0)
Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (0.5.3)
Requirement already satisfied: testpath in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (0.4.4)
Requirement already satisfied: mistune<2,>=0.8.1 in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (0.8.4)
Requirement already satisfied: defusedxml in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (0.7.1)
Requirement already satisfied: entrypoints>=0.2.2 in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (0.3)
Requirement already satisfied: pandocfilters>=1.4.1 in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (1.4.3)
Requirement already satisfied: jupyterlab-pygments in ./下载/python/lib/python3.8/site-packages (from nbconvert->notebook>=6.0->rise) (0.1.2)
Requirement already satisfied: async-generator in ./下载/python/lib/python3.8/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=6.0->rise) (1.10)
Requirement already satisfied: nest-asyncio in ./下载/python/lib/python3.8/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=6.0->rise) (1.5.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in ./下载/python/lib/python3.8/site-packages (from nbformat->notebook>=6.0->rise) (3.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in ./下载/python/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook>=6.0->rise) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in ./下载/python/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook>=6.0->rise) (20.3.0)
Requirement already satisfied: webencodings in ./下载/python/lib/python3.8/site-packages (from bleach->nbconvert->notebook>=6.0->rise) (0.5.1)
Requirement already satisfied: packaging in ./下载/python/lib/python3.8/site-packages (from bleach->nbconvert->notebook>=6.0->rise) (20.9)
Requirement already satisfied: pyparsing>=2.0.2 in ./下载/python/lib/python3.8/site-packages (from packaging->bleach->nbconvert->notebook>=6.0->rise) (2.4.7)
Installing collected packages: rise
Successfully installed rise-5.7.1
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)