![]() | 1 maocat 2023-07-03 13:39:18 +08:00 pyenv |
![]() | 2 hsfzxjy 2023-07-03 13:40:55 +08:00 via Android ![]() python 自带的 venv 库就好了 |
![]() | 3 abersheeran 2023-07-03 13:48:02 +08:00 poetry 、pdm 之类的都有这个配置吧,可以把虚拟环境生成在项目内。 |
![]() | 5 coolair OP @abersheeran poetry 、pdm 也不能指定 Python 版本。 |
6 xxxeeeex 2023-07-03 14:24:48 +08:00 用不同版本的 python 创建 venv ,python3.9 -m venv ,python3.8 -m venv |
8 tqbfjotld 2023-07-03 14:31:46 +08:00 pyenv |
9 Jirajine 2023-07-03 14:39:17 +08:00 https://github.com/mitsuhiko/rye 一个 rustup/cargo inspired Python 环境管理工具 |
10 fcfangcc 2023-07-03 17:25:04 +08:00 一圈用下来还是 pyenv 好用 |
![]() | 11 abersheeran 2023-07-04 13:16:30 +08:00 @coolair poetry 很久没用了不知道,pdm 可以指定。 |
![]() | 12 coolair OP @abersheeran 我看了下,确实可以。但是需要安装所需版本,如果安装了多个 python 版本,那还不如直接用内置的 venv 。 At first, you need to choose a Python interpreter from a list of Python versions installed on your machine. The interpreter path will be stored in .pdm-python and used by subsequent commands. You can also change it later with pdm use. |