You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Jared Mackey, Nicolas CELLIER, ducdetronquito, Doug Friedman, Cauê Baasch de Souza, Miguel Turner, Ogi Moore, kakuaky, Reginald Johnson, Roel Bruggink and 195 more
Reacted by Jean-Baptiste Musso, Ricardo Santos, Hemanta, N. Troy de Freitas , Max Wittig, Constantine Molchanov and Dimitris Kirtsios
We are going to wait until poetry hits version 1.0 before making a decision about this. People should continue to leave a 👍 reaction on the top comment until then to help us prioritize a decision and potential work compared to other feature requests.
We are looking at implementing this, so I want to clarify the desired behavior here: if Poetry is detected in the current environment, prompt user if they want to install packages (pylint, rope, etc) using poetry.
Is that correct? Please let us know if there's additional behavior desired here.
Reacted by Leo Shklovskii, N. Troy de Freitas , Ezra Bowden and Samuel Bishop
Dan Taylor (@qubitron) personally, I found poetry's lack of interpreter version management ability a bit frustrating. I believe this should be addressed in the implementation somehow. Comparing to pipenv's ability to choose an interpreter version to create the environment based on Pipfile, poetry always uses the default interpreter to create the environment and could fail if the version is incompatible with the requirement defined in pyproject.toml.
If things don't work in the tool itself, we're not going to try to add workarounds or implement solutions.
What can be done however is just add support for using poetry, when the extension prompts users to install any python packages. We do this today for conda, pipenv, environments.
I.e. when user needs to install a formatter, we'll (optionally) make use of poetry.
We are looking at implementing this, so I want to clarify the desired behavior here: if Poetry is detected in the current environment, prompt user if they want to install packages (pylint, rope, etc) using poetry.
Is that correct? Please let us know if there's additional behavior desired here.
Till the time support for poetry gets added, I was thinking if there is any hacky way we can get through this. vscode installs any packages with following command: <PYTHONPATH>python -m pip install -U pytest or <PYTHONPATH>python -m pip install -U pylint
Is there any way in vscode where we can map pip install to poetry add --dev?
Abhishek Mulay (@abhishekvm) nope, we don't provide that kind of functionality. You can always do the install manually while people wait for this feature since as you noticed we aren't doing anything too magical.
Activity
brettcannon commentedon Jun 5, 2018
No specific plans at the moment, but if people begin to vote for this issue with a 👍 reaction then we will definitely consider it.
brettcannon commentedon Jun 13, 2018
We are going to wait until poetry hits version 1.0 before making a decision about this. People should continue to leave a 👍 reaction on the top comment until then to help us prioritize a decision and potential work compared to other feature requests.
kevinpostal commentedon Jan 16, 2019
kevinpostal commentedon Jan 16, 2019
One workaround is to use virtualenvs in project root. Then vscode picks it up.
poetry config settings.virtualenvs.in-project truequbitron commentedon Jan 30, 2019
We are looking at implementing this, so I want to clarify the desired behavior here: if Poetry is detected in the current environment, prompt user if they want to install packages (pylint, rope, etc) using poetry.
Is that correct? Please let us know if there's additional behavior desired here.
leos commentedon Jan 31, 2019
Any installations should happen via poetry. It would also be great if VS Code could autodetect the poetry virtualenv and use it.
lig commentedon Jan 31, 2019
Dan Taylor (@qubitron) personally, I found
poetry's lack of interpreter version management ability a bit frustrating. I believe this should be addressed in the implementation somehow. Comparing topipenv's ability to choose an interpreter version to create the environment based onPipfile,poetryalways uses the default interpreter to create the environment and could fail if the version is incompatible with the requirement defined inpyproject.toml.DonJayamanne commentedon Jan 31, 2019
Activating poetry environments do not work (at least not yet).
python-poetry/poetry#198
python-poetry/poetry#571
If things don't work in the tool itself, we're not going to try to add workarounds or implement solutions.
What can be done however is just add support for using
poetry, when the extension prompts users to install any python packages. We do this today for conda, pipenv, environments.I.e. when user needs to install a formatter, we'll (optionally) make use of
poetry.1 remaining item
abhishekvm commentedon Feb 17, 2019
Till the time support for poetry gets added, I was thinking if there is any hacky way we can get through this. vscode installs any packages with following command:
<PYTHONPATH>python -m pip install -U pytestor<PYTHONPATH>python -m pip install -U pylintIs there any way in vscode where we can map
pip installtopoetry add --dev?brettcannon commentedon Feb 20, 2019
Abhishek Mulay (@abhishekvm) nope, we don't provide that kind of functionality. You can always do the install manually while people wait for this feature since as you noticed we aren't doing anything too magical.
DonJayamanne commentedon Feb 27, 2019
PoetryInstallersimilar topipEnvInstalleretc (https://github.com/Microsoft/vscode-python/blob/ae1848a82f5af8983f663d5d4db2c4f77ad62c57/src/client/common/installer/pipEnvInstaller.ts)poetryPathinsettings.jsonpoetryonly if the corresponding lock file is available.dclong commentedon Mar 12, 2019
brettcannon commentedon Mar 12, 2019
ericsnowcurrently commentedon Mar 18, 2019
I was able to verify that poetry is used to install modules:
python -m pip install --user poetrypython -m poetry initpython -m poetry lockThis caused the popup for installing flake8. Then poetry was used to install flake8.