What is the default install path for poetry
Asked Answered
O

4

20

I installed poetry, however I'm getting the following error when attempting to call poetry

zsh: command not found: poetry 

I know I have it installed because I get the following output when trying to run the following install script

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python                                                                             
Retrieving Poetry metadata                                                                                                                                                                    

Latest version already installed.
Overthrow answered 20/3, 2020 at 4:42 Comment(0)
O
53

The default install location is ~/.poetry/bin/poetry

I added the following to my .zshrc

export PATH="$HOME/.local/bin:$PATH"
Overthrow answered 20/3, 2020 at 4:42 Comment(6)
when I installed it with the cURL call it didn't install it there. If I do cd $HOME & ls -a there is no .poetry file :'(. When I do a grep for poetry there are a ton of results at ./Library/Application Support/pypoetry. Any idea why that is or how to fix it? Thanks!Biparty
i would inspect the file that is executed by the curl command, there's likely a clue as to where it was placedOverthrow
The new location is ~/.local/bin/poetry, so it should be export PATH="$HOME/.local/bin:$PATH"October
This answer is out of date, follow @PatrickYan 's update abovePoultice
updated to take poetry version 1.3 into accountObverse
@Obverse a moderator has previously rejected an edit very similar to yours, and yours has just been rejected. In the future, you may add information to a post to keep it up to date, but you should not remove or edit any information in a way that conflicts with the author's original intent. Please see stackoverflow.com/help/editing for more information.Camorra
A
11

Initially I wanted to run poetry within a condo environment. After running

pip install poetry

I saw it was installed using my local Python and not linked to a conda environment. In my case I added

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

to the end of the .zshrc file under my home directory.

Tip: You can use CMD+Shift+. for MacOS to view your hidden files and folders :)

Aframe answered 10/5, 2022 at 14:14 Comment(0)
D
8

Update for the new version of the official poetry installer:

curl -sSL https://install.python-poetry.org | python3 -

This version will install in your default python3 bin. For example: $HOME/Library/Python/3.9/bin, the installer will print out the location to your shell.

Add

export PATH=$HOME/Library/Python/3.9/bin:$PATH

to ~/.profile or ~/.zprofile.

Democratize answered 15/3, 2022 at 3:18 Comment(0)
B
-2

When I faced a situation in which other methods were not working, I just used pip uninstall poetry and pip install poetry to reinstall it and it worked

Borchers answered 2/1 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.