搭建WSL ubuntu python 環境的過程
前提- windows 11 home 版本
目的- 想啟用ubuntu 版本開發python app
Step
-
打開WSL2, 并且安裝ubuntu
-
-
windows 10 企業版, win11 家庭版, 企業版都支持WSL2
-
-
配置Ubuntu 22.04
-
-
更新國內apt 源。 ubuntu更換阿里源 - Lyon2014 - 博客園 (cnblogs.com)
-
安裝sudo apt install python3-pip, sudo apt install python3-virtualenv
-
更新國內pip 源. pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
-
WSL 安裝的ubuntu 版本自動掛在了windows 的share 目錄,過載到ubuntu /mnt 目錄 所以很棒, 直接可以訪問/mnt 目錄就可以訪問windows host 的目錄
-
posted on 2022-12-02 11:08 MissLi12138 閱讀(289) 評論(0) 收藏 舉報
浙公網安備 33010602011771號