question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry Command Not Found on zsh

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: <macOS 10.14 Mojave>
  • Poetry version: <0.12.2>

Issue

I am a noob to poetry, and just installed poetry using the curl command.

I got the following:

Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

$HOME/.poetry/bin

This path will then be added to your `PATH` environment variable by
modifying the profile files located at:

$HOME/.profile
$HOME/.zprofile

You can uninstall at any time with `poetry self:uninstall`,
or by executing this script with the --uninstall option,
and these changes will be reverted.

Installing version: 0.12.2
  - Downloading poetry-0.12.2-darwin.tar.gz (7.00MB)

Poetry (0.12.2) is installed now. Great!

To get started you need Poetry's bin directory ($HOME/.poetry/bin) in your `PATH`
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run `source $HOME/.poetry/env`

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:27 (5 by maintainers)

github_iconTop GitHub Comments

36reactions
swarnakumarcommented, Oct 18, 2018

I have added export PATH="$HOME/.poetry/bin:$PATH" to the my .zshrc, and things work.

I notice that Google Cloud SDK automatically appended its path and path completions to my .zshrc. Maybe thats something poetry could also do?

Closing this issue.

35reactions
sdispatercommented, Oct 18, 2018

So your shell does not source neither the .zprofile file nor the .profile file. That’s weird since ~/.zprofile should always be sourced by zsh.

If it’s not you might want to do it yourself in your .zshrc file.

Just to be sure: has export PATH="$HOME/.poetry/bin:$PATH" been added to ~/.zprofile?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry installed but `poetry: command not found`
When I run this, after shutdown of bash Terminal: export PATH="$HOME/.poetry/bin:$PATH". poetry command is then recognised.
Read more >
poetry installation — Tuto Python
It will add the `poetry` command to Poetry's bin directory, located at: $HOME/.poetry/bin This path will then be added to your `PATH` ...
Read more >
Add poetry to path on OS X : r/learnpython - Reddit
I tried to export the path to .poetry and .poetry/bin to PATH, but the command “poetry” is still unrecognised even though I can...
Read more >
Poetry installation fails on Ubuntu - command line
The installation succeeds. Afterwards when calling poetry --version to test the installation, I get: poetry: command not found. Although ...
Read more >
How to Fix 'zsh: command not found: python' - HackerNoon
3. The issue is easy to fix. Make sure Python is installed and add python to zsh so that it will run upon...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found