-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry Command Not Found on zsh #507
Comments
If you do: echo $PATH What does it give you? |
In a newly opened shell:
And after sourcing via
|
So your shell does not source neither the If it's not you might want to do it yourself in your Just to be sure: has |
Its weird. I don't have a I do have a Is it oh-my-zsh doing something? |
I have added I notice that Google Cloud SDK automatically appended its path and path completions to my Closing this issue. |
Just to check: if you create a |
Yes it does. |
I had the same issue, my system does not have a .profile and zsh does not create a .zprofile by default. |
zsh mainly uses .zshrc, it would definitely be a good idea to check for .zshrc if no .zprofile exists. Just ran into the same issue. |
I'd like to mention users are still running into this issue and it would be nice if it was reopened and addressed, either during installation or in the docs. |
Yes, same issue here. |
Can also confirm that this does not automatically happen. As a user, I would have expected the PATH to have been updated upon installation. |
Same here, I just installed it using the cURL, and in my system I only have the |
i'm on linux and also ran into this issue... similarly to those above the workaround of adding |
Still running into the same issue. |
If the PATH for poetry is there in .profile then you have to just logout from the current session and log in again. The changes in .profile will be reflected. |
Same issue. No |
Running
then packages install. Is the |
Even trying @sdispater and @abn do we know why this is still happening? |
I should have clarified on my comment above that I am also on WSL, although I was on WSL1 at time i encountered the bug |
This issue might need to be reopened as it's still an issue, and just means the install flow isn't as smooth. I had the same issue as I didn't have a .zprofile or a .profile so just had to add the path myself in the .zshrc file. |
Issue still exists, and should be reopened. zsh is the default shell for new installations of macOS for the last several major OS releases. Therefore having this issue not fixed means that Poetry will not be usable after installation by default on new macOS machines & VMs. |
I was experiencing a similar issue with a bash shell running on WSL2. I was connecting to it via the remote development extension for VScode. I noticed that if I directly accessed my WSL2 VM by opening the Ubuntu application, the shell was sourcing the .profile and could find the poetry command. Then, suspecting it was a VScode remote development problem, I started googling and found this issue. Pretty interesting how VScode works, but long story short: if you're having issues with poetry not being added to your path and you're using WSL2 and VScode remote development to connect, try closing all of your VScode windows, wait a few seconds, and then try again. Then starting a new terminal connected to your WSL2 VM on VSCode should have poetry in your path. Posting here in case it helps anyone else resolve this issue. |
Had the same problem today, was left scratching my head. Noticed it worked on bash. On a default installation of oh-my-zsh, the PATH variables won't have $HOME/.local/bin added to it. I didn't notice this when changing my system shell because Rust Cargo which also has a binary there modifies the environment and sources a binary located elsewhere too. However, instead of using the export PATH provided by Poetry, I copied mine from my .bashrc, which was as follows: # User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH |
I did a fresh install with
|
Hello everbody, I have same problem when installed the poetry for the first time. I'm using the Linux Mint 21. Best Regards |
Hi all, I am locking this issue as it originally refers to the old installer which managed your PATH for you. With the new install methods, the responsibility for modifying the $PATH (both in the current session and in the shell configuration) is returned to the user. This is because knowing what is correct on any given user's machine (and making the change/undoing it cleanly) is very fraught, and most power users object to automated modification of their shell configuration. If you are having issues adding Poetry to your PATH, please start a Discussion or make use of resources like Stack Overflow as this is a very generic problem. |
-vvv
option).Issue
I am a noob to poetry, and just installed poetry using the curl command.
I got the following:
But when I start a new shell, and run
poetry --version
, I get:zsh: command not found: poetry
Works fine if I do
source $HOME/.poetry/env
. But doesn't retain for a new shell. I have to do this every time I open a new shell.The text was updated successfully, but these errors were encountered: