前言与参考资料
前言
近期深入研习 python-igraph 库时体会到,阅读官方文档对于掌握新语言或工具极具价值。本次代码编写主要依据 igraph 官方 API 文档进行。
官方 API 文档地址:http://pythonhosted.org/python-igraph/igraph.Graph-class.html
下文将详细阐述在 Linux Ubuntu 环境下安装、卸载及彻底删除 python-igraph 的具体步骤,供读者参考学习。
一、如何在 Ubuntu 16.10 上安装 python-igraph?
首先需执行系统更新命令以准备环境。
sudo add-apt-repository ppa:igraph/ppa # Add the Launchpad repository to apt
sudo apt-get update
上述操作会下载 Ubuntu 16.10 的软件包列表,从而同步最新版本的软件包及其依赖关系至本地系统。
待最新软件包列表下载完成后,即可启动安装流程。
若系统中未安装 python-igraph,执行 'dpkg -L python-igraph' 命令将返回如下错误提示。
deepak@deepak-VirtualBox:~$ dpkg -L python-igraph
dpkg-query: package 'python-igraph' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
deepak@deepak-VirtualBox:~$
安装 python-igraph:
系统更新完毕后,使用以下命令进行 python-igraph 的安装。
sudo apt-get install python-igraph
在 Ubuntu 16.10 操作系统中安装软件包前,该命令会进行确认。若当前用户非 root 权限,安装程序将提示输入 root 密码。安装结束后,即可在系统中使用该软件包。
二、如何从 Ubuntu 16.10 卸载/删除 python-igraph?
接下来介绍从 Ubuntu 16.10 中卸载 python-igraph 的方法。可通过 apt 命令轻松移除该软件包。
使用以下命令删除 python-igraph。
sudo apt-get remove python-igraph
此命令用于移除 python-igraph 包及其相关依赖项。
sudo apt-get remove --auto-remove python-igraph
该操作将清除系统中不再需要的 python-igraph 及其所有依赖软件包。
完全删除包含配置文件的 python-igraph:
需谨慎使用以下命令,因为它会删除所有配置文件和数据。
sudo apt-get purge python-igraph
或者也可以使用以下命令:
sudo apt-get purge --auto-remove python-igraph
上述命令将删除与 python-igraph 包关联的所有配置文件和数据。由于数据无法恢复,请务必谨慎操作。
参考文章:http://www.chenxm.cc/post/447.html
总结
以上就是本文的全部内容,希望能为各位的学习或工作提供参考。如有疑问欢迎留言交流,感谢支持。