Answer a question

I've had a million and one issues with Poetry recently.

I got it fully installed and working yesterday, but after a restart of my machine I'm back to having issues with it ;(

Is there anyway to have Poetry consistently recognised in my Terminal, even after reboot?


System Specs:

  • Windows 10,
  • Visual Studio Code,
  • Bash - WSL Ubuntu CLI,
  • Python 3.8.

Terminal:

me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/workers-python/workers/data_simulator/src$ poetry run python3 cli.py
poetry: command not found
me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/workers-python/workers/data_simulator/src$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
Retrieving Poetry metadata

This installer is deprecated. Poetry versions installed using this script will not be able to use 'self update' command to upgrade to 1.2.0a1 or later.
Latest version already installed.
me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/workers-python/workers/data_simulator/src$ poetry run python3 cli.py
poetry: command not found
me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/workers-python/workers/data_simulator/src$ 

Please let me know if there is anything else I can add to post to help further clarify.

Answers

When I run this, after shutdown of bash Terminal:

export PATH="$HOME/.poetry/bin:$PATH"

poetry command is then recognised.

However, this isn't enough alone; as every time I shutdown the terminal I need to run the export.

Possibly needs to be saved in a file.

Logo

Python社区为您提供最前沿的新闻资讯和知识内容

更多推荐