GithubHelp home page GithubHelp logo

Comments (9)

woodruffw avatar woodruffw commented on August 24, 2024 1

Unfortunately I suspect this won't work, at least not with any poetry plugin that wants to upgrade Homebrew's Python environment: allowing these kinds of resolution changes would allow anything that gets brew installed to break other Homebrew-managed Python applications.

I believe there are two resolutions possible here:

  • We could package this poetry plugin as a formula with the same Python dependency as poetry itself, which would drop it into the same environment. Then, you could do brew install poetry-dynamic-version to enable it.
  • You could put poetry into its own environment, which is (probably) how it wants to be used (I don't know poetry super well, but this is what their docs suggest). I think brew install pipx; pipx install poetry; pipx inject poetry "poetry-dynamic-versioning[plugin]" would suffice for that.

from homebrew-core.

twam avatar twam commented on August 24, 2024

I personally would prefer a way, that is managed by brew, so that a brew upgrade will also update poetry and its plugins.

The second suggestion works for now, but feels wrong, as there is a poetry package provided by brew which I cannot use. :)

from homebrew-core.

SMillerDev avatar SMillerDev commented on August 24, 2024

You can make your own tap and maintain a package there.

from homebrew-core.

github-actions avatar github-actions commented on August 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

from homebrew-core.

btonasse avatar btonasse commented on August 24, 2024

Encountering the same issue :(

from homebrew-core.

woodruffw avatar woodruffw commented on August 24, 2024

Encountering the same issue :(

Have you tried either of the resolutions suggested above? Relying with a "me too" comment on its own doesn't help us address the underlying problem.

Keep in mind: Homebrew does not distribute Python with the expectation that arbitrary third-party packages can be loaded into Homebrewed Python's environment. If this is a capability that you need, you must use pip, pipx, or pyenv, depending on the layer of abstraction you need. For poetry, pipx with dependency injection is probably the simplest option, and seems to be recommended by poetry's maintainers.

from homebrew-core.

btonasse avatar btonasse commented on August 24, 2024

I do not expect you to "solve it", but I think developers like to have an idea of how many users are encountering an issue and how problematic it is for them. That alone is worth a "me too" post. You're of course free to do whatever you want with that information. But last time I checked this issue was not closed.

And yes, refraining from installing poetry with homebrew sidesteps the problem.

from homebrew-core.

heidi-jack avatar heidi-jack commented on August 24, 2024

I was also experiencing this issue, in the end I just uninstalled poetry via brew and installed it outside of brew. Not worth the faff. Not a solution within brew unfortunately but it unblocked me from getting work done

https://python-poetry.org/docs/#installing-with-the-official-installer

from homebrew-core.

woodruffw avatar woodruffw commented on August 24, 2024

I think this is currently non-actionable on Homebrew's side. Our recommendations to users who need Poetry plugins are:

  1. brew install pipx && pipx install poetry and use pipx's environment injection abilities to load plugins into Poetry's virtual environment (described above)
  2. Do python -m venv env && env/bin/python -m pip install poetry if using a directly managed virtual environment is appropriate for your use case
  3. brew install pyenv and then pyenv to install a non-Homebrew version of Python without PEP 668 restrictions, and then pip install --user poetry directly (if that's what you want)
  4. Use Poetry's own installer (keeping in mind that Homebrew doesn't check the contents of this installer, and doesn't guarantee that it works correctly with the Homebrewed Python)

from homebrew-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.