[詳細教學](https://blog.kyomind.tw/python-poetry/) ## poetry 安裝 ```shell curl -sSL https://install.python-poetry.org | python3 - ``` ## 初始化poetry 進到要執行的檔案的同層資料夾建立環境, ```shell poetry init ``` ## 建立虛擬環境 ```shell poetry env use python ``` ## 新增套件 ```shell poetry add ``` ## 切換環境 在已建立環境的資料夾(會產生.toml檔的地方)下打以下指令 ```shell poetry shell ``` ## 離開環境 ```shell= exit ``` ## 查看該虛擬環境已安裝套件 ```shell= poetry show ``` ## 移除套件 ```shell= poetry remove <套件名稱> ``` ## 刪除虛擬環境 直接刪除虛擬環境的資料夾 ## 直接將別人寫好的套件版本加入虛擬環境中 ```shell= poetry install ``` # ros2 與 poetry 怎麼用 先進入虛擬環境再source ros2環境
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up