Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the specified Python version in pdm install #1811

Closed
Well2333 opened this issue Apr 4, 2023 · 3 comments
Closed

Use the specified Python version in pdm install #1811

Well2333 opened this issue Apr 4, 2023 · 3 comments
Labels
⭐ enhancement Improvements for existing features

Comments

@Well2333
Copy link

Well2333 commented Apr 4, 2023

When I use pdm install command to install dependencies, pdm will use the first available Python interpreter directly, and there is no way to specify which interpreter I want to use.

For instance, if my global default interpreter is Python 3.9 and I want to use 3.8 for compatibility testing, I need to create a virtual environment using pdm venv create python3.8 first, and then install dependencies using pdm install. This seems a bit cumbersome.

Is it possible to add a parameter like --python python3.8 to specify the Python version, just like conda create python=3.8?

Meanwhile, the pdm use command defaults to using PEP 582. Could you consider adding support for venv , just like what poetry use does?

当我尝试使用 pdm install 命令时,pdm会直接使用顺位第一的python解释器,而并没有办法指定用户想要使用的解释器。

例如,我的全局默认解释器是 python3.9,而我想要使用3.8进行兼容性测试,那么我需要首先使用 pdm venv create python3.8 来创建虚拟环境,然后才能 pdm install 进行依赖安装,这显得有一些麻烦

是否可以考虑可以添加参数 --python python3.8 来指定python版本,就像 conda create python=3.8?

同时,pdm use 指令会默认使用 pep582 ,能否考虑在此基础上添加venv的支持,就像 poetry use 一样?

@Well2333 Well2333 added the ⭐ enhancement Improvements for existing features label Apr 4, 2023
@frostming
Copy link
Collaborator

I think it's #1705

@Well2333
Copy link
Author

Well2333 commented Apr 4, 2023

I think it's #1705

Sorry for not noticing this issue. The keywords I searched using didn't coincide well with the keywords used for this issue, so I missed it. I'll move to this issue for discussion

@Well2333 Well2333 closed this as completed Apr 4, 2023
@Well2333
Copy link
Author

Well2333 commented Apr 4, 2023

But my needs are still a little different, the coverage will be relatively small, and the issue about pdm use is not covered in #1705 . However, I think the overlap is still quite large, and you can reopen this issue if you feel that it is valuable to discuss it separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

No branches or pull requests

2 participants