Python:修订间差异
来自康健生活
无编辑摘要 |
|||
| (未显示同一用户的12个中间版本) | |||
| 第1行: | 第1行: | ||
== 方法 == | |||
{| class="wikitable" | |||
|- | |||
| [[/json|json]] || 示例 || 示例 || 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 || 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 || 示例 || 示例 || 示例 | |||
|} | |||
== 描述 == | == 描述 == | ||
* [[/Python源|Python源]] | * [[/Python源|Python源]] | ||
* [[/群晖python|群晖python]] | * [[/群晖python|群晖python]] | ||
| 第19行: | 第28行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
alias python='/usr/bin/python3.4'</syntaxhighlight> | alias python='/usr/bin/python3.4'</syntaxhighlight> | ||
== 管理工具 == | |||
{| class="wikitable" | |||
|- | |||
| [[/easy_install|easy_install]] || [[/pip|pip]] | |||
|} | |||
== 数据类型 == | |||
{| class="wikitable" | |||
|- | |||
| [[/Numbers|Numbers]] || [[/String|String]] || [[/List|List]] || [[/Tuple|Tuple]] || [[/Dictionary|Dictionary]] | |||
|} | |||
== 加密解密 == | |||
{| class="wikitable" | |||
|- | |||
| [[/crypto|crypto]] || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 | |||
|} | |||
== 虚拟环境 == | |||
{| class="wikitable" | |||
|- | |||
| [[/virtualenv|virtualenv]] || venv || pyvenv | |||
|} | |||
== 包 == | |||
{| class="wikitable" | |||
|- | |||
| [[/torch|torch]] | |||
|} | |||
== 组件 == | |||
[[/bs4|bs4]] | |||
== 删除 == | |||
{| class="wikitable" | |||
|+ 删除python包 | |||
|- | |||
| 查看当前系统安装的python包 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis python</syntaxhighlight>}} | |||
|- | |||
| 强制删除系统安装程序python包及其相关 || {{shc|<syntaxhighlight lang="bash"> | |||
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps</syntaxhighlight>}} | |||
|- | |||
| 删除所有残余文件 ##xargs,允许你对输出执行其他某些命令 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis python |xargs rm -frv</syntaxhighlight>}} | |||
|- | |||
| 验证删除,返回无结果 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis python</syntaxhighlight>}} | |||
|} | |||
{| class="wikitable" | |||
|+ 删除现有yum | |||
|- | |||
| 示例 || {{shc|<syntaxhighlight lang="bash"> | |||
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps</syntaxhighlight>}} | |||
|- | |||
| 示例 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis yum |xargs rm -frv</syntaxhighlight>}} | |||
|- | |||
| 下载相应的rpm包(centos6版本) || {{shc|<syntaxhighlight lang="bash"> | |||
http://mirrors.ustc.edu.cn/centos/6/os/x86_64/Packages/</syntaxhighlight>}} | |||
|} | |||
== 功能 == | == 功能 == | ||
== 示例 == | == 示例 == | ||
{| class="wikitable" | |||
|- | |||
| [[/字符串转JSON|字符串转JSON]] || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 | |||
|} | |||
== error == | |||
* ERROR: XMLRPC request failed [code: -32500] | |||
: {{shc|<syntaxhighlight lang="bash"> | |||
pip install pip-search</syntaxhighlight>|$|/home/kangkk}} | |||
: 永久禁用 XMLRPC 搜索。 | |||