6.5K
![Python虛擬環境套件管理及命令使用比較表](https://simplelearn.tw/wp-content/uploads/2023/02/Blog-Features-1200-×-800-像素-1-14-1024x683.png)
Python虛擬環境套件管理及命令使用比較表
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-15.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-16.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-17.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-18.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-19.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-20.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-21.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-22.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-23.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-24.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-25.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-26.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-27.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-28.png)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-29.png)
文章目錄
![Python虛擬環境套件管理及命令使用比較表](https://simplelearn.tw/wp-content/uploads/2023/02/Blog-Features-1200-×-800-像素-1-14-1024x683.png)
如果讀者過去有使用過 pip 和 virtualenv 的經驗,則可以使用 conda 來執行所有相同的操作。簡單來說,pip 是一個套件管理器,virtualenv 是一個環境管理器,而 conda 則兩者兼而有之。
如果還沒有使用過的讀者可以參考下面幾篇完整介紹文章,可以 step by step 實際學習操作。
現在就讓我們帶大家認識一下筆次間的差異。
Task 01:安裝套件 (Package)
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-15.png)
Task 02:更新套件
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-16.png)
Task 03:更新套件管理器
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-17.png)
Task 04:移除套件
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-18.png)
Task 05:建立環境
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-19.png)
Task 06:啟用環境
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-20.png)
conda activate 僅適用於 conda 4.6 及更高版本。對於 4.6 之前的 conda 版本,則可以考慮下面輸入方式:
- Windows:activate
- Linux and macOS:source activate
Task 07:停用環境
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-21.png)
Task 08:搜尋可用套件
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-22.png)
Task 09:從特定來源安裝套件
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-23.png)
Task 10:列出已安裝套件
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-24.png)
Task 11:建立需求文件
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-25.png)
Task 12:列出所有環境
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-26.png)
Task 13:安裝其它套件管理器
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-27.png)
Task 14:安裝 Python
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-28.png)
Task 15:更新 Python
![](https://simplelearn.tw/wp-content/uploads/2023/02/image-29.png)
conda update python:執行後將會更新到該系列中的最新版本,因此任何 Python 2.x 都會更新到最新的 2.x,而任何 Python 3.x 都會更新到最新的 3.x。
如果你喜歡這篇文章歡迎訂閱、分享(請載名出處)與追蹤,並持續關注最新文章。同時 FB 及 IG 也會不定期提供國內外教育與科技新知。
2 comments
[…] 引用通告: Conda vs. pip vs. virtualenv 命令使用比較 – Simple Learn […]
[…] 引用通告: Conda vs. pip vs. virtualenv 命令使用比較 – Simple Learn […]