Issue
I am using Poetry version 1.1.7
.
I want to run CompositeKey_worker.py
through poetry
: poetry run python3 CompositeKey_worker.py
.
It states click
isn't installed.
I add click
as a dependency, and ensure it is already installed.
I run it again but gives returns the error.
Note: Running poetry install
gives a separate error: post
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry run python3 CompositeKey_worker.py
Traceback (most recent call last):
File "CompositeKey_worker.py", line 4, in <module>
import click
ModuleNotFoundError: No module named 'click'
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry add click
The following packages are already present in the pyproject.toml and will be skipped:
• click
If you want to update it to the latest compatible version, you can use `poetry update package`.
If you prefer to upgrade it to the latest available version, you can use `poetry add package@latest`.
Nothing to add.
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ pip install click
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: click in /home/me/.local/lib/python3.8/site-packages (8.0.1)
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry run python3 CompositeKey_worker.py
Traceback (most recent call last):
File "CompositeKey_worker.py", line 4, in <module>
import click
ModuleNotFoundError: No module named 'click'
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$
Solution
poetry self update 1.0.10
then poetry install
.
As mentioned here. Two separate errors, both caused by poetry version.
Answered By - user16341274
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.