poetry: Poetry 0.12.2 installer doesn't modify PATH or install required jsonschema
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: macOS 10.13.4 / Docker (FROM python:3.6.5)
- Poetry version: 0.12.2
- Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
When performing a fresh install using get-poetry.py
$HOME/.poetry/bin
doesn’t get added to the PATH like in previous releases.
Secondly, after running poetry self:update
(or a fresh install using the get-poetry.py
) poetry crashes with any command.
[AttributeError]
module ‘jsonschema’ has no attribute ‘Draft7Validator’run <args> (<args>)…
I had to update jsonschema manually to get it to work.
pip install --upgrade jsonschema --pre
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 15
- Comments: 17 (8 by maintainers)
Poetry will not be available in the current shell after installation you have to execute:
For the
jsonchema
problem, you best bet is to uninstall the currently installed Poetry version, especially if you come from0.11.5
, and reinstall it usingget-poetry.py
.Building a docker image doesn’t use a single shell instance across
RUN
commands so the$HOME/.poetry/env
wont work, nor willRUN bash -c "EXPORT PATH='/root/.poetry/bin:$PATH'
.I’m happy with the work around of explicitly modifying the PATH but that would indicate that the installer isn’t doing what it says it is doing in all scenarios. I haven’t dug through the difference between the installers but I’m curious as to why it worked pre 0.12.0. It seems like a regression as the change log doesn’t mention this being intentional.
Thanks for clarifying. Is there a reason poetry doesn’t get installed to
/usr/local/bin
on linux? It’s pretty standard behaviour for locally built (setup.py) tools to go there (e.g. pip, pyvenv, etc). This would make them available without any PATH modification.Each
RUN
step in a Dockerfile is not executed in the same shell instance soRUN bash -c "source $HOME/.poetry/env"
will not work (orRUN source $HOME/.poetry/env
, assource
is not a regular command).This docker file with Poetry 0.11.5 shows the installer correctly modifying the PATH.
And the following Dockerfile shows that Poetry 0.12.x doesn’t correctly modify the PATH
I have to explicitly configure the PATH variable with the 0.12.x installer in the Dockerfile, which goes against what the installer script prints