我试图在Ubuntu20.04.3LTS上使用按推荐的方式安装诗歌:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -当我这样做的时候,上面写着:
content.com/python-poetry/poetry/master/get-poetry.py | python -
Command 'python' not found, did you mean:
command 'python3' from deb python3
command 'python' from deb python-is-python3
curl: (23) Failed writing body (485 != 1378)然后我尝试python3
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -安装成功。
之后,当调用poetry --version测试安装时,我得到:
poetry: command not found虽然我手动地将诗歌添加到PATH中,但在.bash_profile中:
PATH=$PATH:~/poetry/bin我还尝试在.bashrc中向path添加诗歌,类似于这个答案:
export PATH="~/poetry/bin:$PATH"发布于 2021-12-02 10:15:44
将~/poetry/bin添加到PATH中,但应该是~/.poetry/bin。
关于python不可用,您可以(重新)通过apt安装python-is-python3包:
sudo apt install python-is-python3发布于 2022-09-22 21:42:30
为了子孙后代,OP提到了安装诗歌已经被废弃了的旧方法。从2022年9月22日起,他们建议对Linux使用以下命令:
curl -sSL https://install.python-poetry.org | python3 -我在Ubuntu20.04.4LTS上使用了它,一切都进行得很顺利。
https://askubuntu.com/questions/1378785
复制相似问题