Python:修订间差异
来自康健生活
| (未显示同一用户的2个中间版本) | |||
| 第1行: | 第1行: | ||
== 方法 == | |||
{| class="wikitable" | |||
|- | |||
| [[/json|json]] || 示例 || 示例 || 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 || 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 || 示例 || 示例 || 示例 | |||
|} | |||
== 描述 == | == 描述 == | ||
* [[/Python源|Python源]] | * [[/Python源|Python源]] | ||
| 第24行: | 第34行: | ||
| [[/easy_install|easy_install]] || [[/pip|pip]] | | [[/easy_install|easy_install]] || [[/pip|pip]] | ||
|} | |} | ||
== 数据类型 == | |||
{| class="wikitable" | |||
|- | |||
| [[/Numbers|Numbers]] || [[/String|String]] || [[/List|List]] || [[/Tuple|Tuple]] || [[/Dictionary|Dictionary]] | |||
|} | |||
== 加密解密 == | |||
{| class="wikitable" | |||
|- | |||
| [[/crypto|crypto]] || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 | |||
|- | |||
| 示例 || 示例 || 示例 | |||
|} | |||
== 虚拟环境 == | == 虚拟环境 == | ||
{| class="wikitable" | {| class="wikitable" | ||
2022年8月18日 (四) 03:48的最新版本
方法
| json | 示例 | 示例 | 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 | 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 | 示例 | 示例 | 示例 |
描述
查看python安装情况
ls /usr/bin/python*
find / -name python*
whereis python #此命令会将python不同版本的所有路径输出
which python #此命令是显示当前python版本的路径
update-alternatives --list python #ubuntu维护系统命令链接符的工具
python --version
alias python='/usr/bin/python3.4'
管理工具
| easy_install | pip |
数据类型
| Numbers | String | List | Tuple | Dictionary |
加密解密
| crypto | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
虚拟环境
| virtualenv | venv | pyvenv |
包
| torch |
组件
删除
| 查看当前系统安装的python包 | whereis python
|
| 强制删除系统安装程序python包及其相关 | rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps
|
| 删除所有残余文件 ##xargs,允许你对输出执行其他某些命令 | whereis python |xargs rm -frv
|
| 验证删除,返回无结果 | whereis python
|
| 示例 | rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
|
| 示例 | whereis yum |xargs rm -frv
|
| 下载相应的rpm包(centos6版本) | http://mirrors.ustc.edu.cn/centos/6/os/x86_64/Packages/
|
功能
示例
| 字符串转JSON | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
error
- ERROR: XMLRPC request failed [code: -32500]
/home/kangkk
pip install pip-search
- 永久禁用 XMLRPC 搜索。
No categories