vault backup: 2025-01-20 10:49:19
This commit is contained in:
		| @ -25,10 +25,10 @@ tags: | |||||||
| 		- ``poetry env use python3.x`` | 		- ``poetry env use python3.x`` | ||||||
| 	- 透過pyproject.toml產生poetry.lock環境檔(通常在修改完前者後執行) | 	- 透過pyproject.toml產生poetry.lock環境檔(通常在修改完前者後執行) | ||||||
| 		- ``poetry lock`` | 		- ``poetry lock`` | ||||||
| 	- 將環境檔套用至虛擬環境中(實際上跑安裝的部分) | 	- 將poetry.lock環境檔套用至虛擬環境中(實際上安裝套件至venv的部分!) | ||||||
| 		- ``poetry install`` | 		- ``poetry install`` | ||||||
| 	- 輸出requirements.txt | 	- 輸出requirements.txt | ||||||
| 		1. 安裝export插件(poetry2.0以上版本) | 		1. 安裝export插件(poetry2.0以上版本需要自己裝) | ||||||
| 			- ``pipx inject poetry poetry-plugin-export`` | 			- ``pipx inject poetry poetry-plugin-export`` | ||||||
| 		2. 執行指令 | 		2. 執行指令 | ||||||
| 			- ``poetry export --without-hashes --format=requirements.txt > requirements.txt`` | 			- ``poetry export --without-hashes --format=requirements.txt > requirements.txt`` | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user