python 模組相關的命令

2021-07-23 08:45:54 字數 525 閱讀 6877

方法1:

安裝在python上的模組,可以用pip或者執行setup.py來安裝

如果你是用pip安裝的,可以直接使用pip uninstall 模組名

如果是用python setup.py install安裝,使用python setup.py uninstall來解除安裝

方法2:(手工刪除)

摘自:去python的第三方模組或包的存放位置進行手工刪除檔案和資料夾,然後刪除easy-install.pth檔案中的相應的行。python的模組和包的預設存放位置請檢視博文

to uninstall an .egg you need to rm -rf the egg (it might be a directory) and remove the matching line from site-packages/easy-install.pth

1.列舉所有模組

help(『modules』)

2.檢視模組中的函式列表。

(1)幫助文件。

(2)dir(模組名)

linux 模組相關命令

1.lsmod 顯示目前系統所載入的模組 lsmod more 顯示如下 每一列依次是 模組名,模組大小,使用它的模組數 及其部分這些模組的名字 2.modeinfo mode name 檢視模組資訊 modeinfo thinkpad acpi 顯示如下 thinkpad筆記本的acpi驅動,主頁...

Python時間相關的模組

一.在python中表示時間的方式 1.時間戳 timestamp 時間戳表示的是從1970年1月1日00 00 00,按秒計算偏移量 clock time 格式化的時間字串 了解 a 本地簡化的星期的名稱 a 完整的星期的名稱 b 簡化的月份的名稱 b 完整的月份的名稱 c 本地對應的日期表示和時...

python 時間相關模組

import time 目前開發中用時間標準時間 utc time.time 當前時間戳 1970 1 1到現在的秒數 c time.time print time.gmtime c time.struct time tm year 2018,tm mon 4,tm mday 25,tm hour ...