-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 non-default python when creating virtualenv #988
Comments
Poetry will likely never become a Python version manager, see #439 (comment).
I believe that functionality is available in the 1.0 alpha releases: #731 |
I don't suggest managing python versions, I only suggest using appropriate python if it's already available in poetry env use python3.7
poetry install to use system Python3.7? |
My logic behind this feature request is - one should be able to supply python when creating virtualenv, which |
What works for me:
Would that work for you? |
I'd like to second this request. I suspect I'm not alone in encountering Poetry, reading the docs, and being surprised when:
Didn't lead to a Poetry created
When the docs state:
I assumed that:
Simply meant that, in the absence of a I'd really love that to be the case, but if it isn't, second-best would be to more explicitly address that in the docs. Though given the frequent plugs for |
And nor should it! I completely agree with that thinking. However, since a virtualenv is already being created, checking the path for a
Given how many projects and teams are now implementing Poetry and beginning to depend on it to provide a common environment, and the fact that Poetry already creates a virtual env, this seems like a reasonable feature to expect. Not at all a step towards package management nor python management. Simply an attempt to used a declared python version, if it exists, when creating the virtual environment that Poetry already creates. |
I probably should clarify my use case: I use system pythons and virtualenvwrapper and try to swap the latter to poetry. I never used pyenv nor I want to. |
Additionally, having the Python version explicitly in the command ensures that it is used for that one execution only. If all you want to do is run a one-shot command it is cumbersome to do:
instead of
This is especially true for automated CI pipelines where one job is not necessarily running in the same context as another. Having the ability to add the env-path as a command-line argument makes this explicit in the job definition and it also helps the reader of the CI definition file. |
I completely agree. @sdispater solved the second point, by introducing a new However he did not solve the first point, the implicit way is still broken. In the absence of an activated virtual environment, Poetry should implicitly create a built-in virtual environment with the Python version specified by the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still relevant. |
This has been fixed in the latest beta releases of the |
As mentioned in #988 (comment), I think half of this is fixed by #731. The other half is the subject of #1386, so maybe this issue should be closed and discussion continue there? |
@matthijskooijman #1386 has been addressed in #1477 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
I want to use non-default python for virtualenv, my current workaround:
It would be cool for poetry to do two things:
pyproject.toml
is available and use it-p path/to/python
switchNow it just fails with a confusing message.
The text was updated successfully, but these errors were encountered: