已安装诗歌但“诗歌:找不到命令”
Poetry installed but `poetry: command not found`
我最近有一百万零一个关于诗歌的问题。
我昨天完全安装并运行了它,但是在我的机器重新启动后我又遇到了问题;(
有没有办法在我的终端中始终识别 Poetry,即使在重新启动后也是如此?
系统规格:
- Windows10,
- Visual Studio代码,
- Bash - WSL Ubuntu CLI,
- Python3.8.
航站楼:
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$
如果还有什么我可以添加到 post 以帮助进一步澄清,请告诉我。
当我 运行 关闭 bash 终端后:
export PATH="$HOME/.poetry/bin:$PATH"
poetry
命令被识别。
然而,仅此还不够;因为每次我关闭终端我都需要 运行 export
.
可能需要保存在文件中。
对于@StressedBoi69420 的回答follow-up,你能否添加他建议的行,即
export PATH="$HOME/.poetry/bin:$PATH"
给你的 .bashrc
?
根据其他 Stack Overflow post 和@arshbot 的回答,我添加了这一行
export PATH=$PATH:$HOME/.poetry/bin
到我的 .zshrc
,它似乎在工作。
我最近有一百万零一个关于诗歌的问题。
我昨天完全安装并运行了它,但是在我的机器重新启动后我又遇到了问题;(
有没有办法在我的终端中始终识别 Poetry,即使在重新启动后也是如此?
系统规格:
- Windows10,
- Visual Studio代码,
- Bash - WSL Ubuntu CLI,
- Python3.8.
航站楼:
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$
如果还有什么我可以添加到 post 以帮助进一步澄清,请告诉我。
当我 运行 关闭 bash 终端后:
export PATH="$HOME/.poetry/bin:$PATH"
poetry
命令被识别。
然而,仅此还不够;因为每次我关闭终端我都需要 运行 export
.
可能需要保存在文件中。
对于@StressedBoi69420 的回答follow-up,你能否添加他建议的行,即
export PATH="$HOME/.poetry/bin:$PATH"
给你的 .bashrc
?
根据其他 Stack Overflow post export PATH=$PATH:$HOME/.poetry/bin
到我的 .zshrc
,它似乎在工作。