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.

Add poetry to all shells on install?

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Currently it seems that poetry adds itself to the PATH in the system’s default shell. Here’s an example — this system has fish as a default shell, and when installing on bash, only the path on fish is modified:

bash-5.0$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
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 `fish_user_paths` universal variable.

Note the modifying the 'fish_user_paths'.

This means that it then won’t be linked in bash. This is particularly an issue on Mac where zsh is now the default shell, but many people still use bash.

Is there a reason to not link in all available shells? Or at least the current shell and the default shell?

Thanks as ever for the excellent tool!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
max-sixtycommented, Oct 17, 2020

This is particularly an issue on Mac where zsh is now the default shell, but many people still use bash.

But, to be clear, this should not be an issue. Windows and fish are the only special cases. The rest are Unix shells, and all profile files found will be modified.

That makes sense — my mistake

Thanks a lot for the PR!

1reaction
cauebscommented, Oct 17, 2020

I think I suggested ages ago that we linked it from ~/.local/bin and just hope for the best, hahah.

I don’t think that looking at the PATH to decide where to put it is a good idea, but maybe make it add ~/.local/bin to PATH instead of the Poetry directory, via the method currently implemented, and then link from there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commands | Documentation | Poetry - Python dependency ...
This lists all packages installed within the Poetry install environment. To show only additional packages that have been added via self add and...
Read more >
Python Poetry, install project into shell's namespace
What is a / the proper way to install Python programs into the shell's namespace via Poetry? With setuptools , you can use...
Read more >
Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >
How To Install Poetry to Manage Python Dependencies on ...
Once the installation completes, Poetry will prompt you to add its bin directory to your PATH in order to enable the use of...
Read more >
poetry installation — Tuto Python
It will add the `poetry` command to Poetry's bin directory, ... To configure your current shell run `source $HOME/.poetry/env` ...
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