Skip to content
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

Integration with Conda #48

Closed
kwrobert opened this issue Sep 30, 2017 · 5 comments
Closed

Integration with Conda #48

kwrobert opened this issue Sep 30, 2017 · 5 comments

Comments

@kwrobert
Copy link

First, this project is awesome and I'm loving it so far.

This is more of a feature request than an actual issue, but I was thinking it would be really cool if hatch could optionally integrate with conda. Perhaps one could switch between "conda mode" and "normal mode" where hatch env, hatch install, etc. are just wrappers around the relevant conda commands.

The main benefit from this is consolidation, instead of having to manually manage two sets of virtual environments (ones generated by conda and ones generated by hatch), everything could just be managed through hatch. The second benefit is that install will pull from the conda repos instead of PyPI repos, which tends to have nicely optimized data analysis packages.

I did try just configuring hatch to put its virtual environments under ~/miniconda/envs, but conda didn't pick them up for some reason (I think because conda expects some additional metadata and environment structure).

In the future, it might also be really neat to integrate with Anaconda Project. Apparently the API isn't stable yet though :(

If this is a pain, or otherwise a silly request, feel free to say so.

Thanks!

@ofek
Copy link
Sponsor Collaborator

ofek commented Sep 30, 2017

Thanks!

This is something I want to do but after 1.0 and in a slightly different way.

My idea is to continue using virtualenv for envs but package management would have a --conda flag that would pull directly from their repos.

@petebachant
Copy link

Something that would be nice to automate is which package manager to use to get a package. Usually I will first try installing via conda, and if that fails, fallback to pip.

@ofek
Copy link
Sponsor Collaborator

ofek commented Dec 30, 2021

Hatch has been rewritten from scratch and now supports environment plugins if someone wants to make one for conda, see https://ofek.dev/hatch/latest/config/environment/#type

@ofek ofek closed this as completed Dec 30, 2021
@OldGrumpyViking
Copy link
Contributor

@ofek : Thanks again for a great tool.

I allowed myself to copy your hatch-container plugin and make one for Conda: hatch-conda.

The main use-case is for using matrix environments (running with multiple python version) on machines that have conda installed.
Resolving packages from the conda | conda-forge index might be something that will be added later.

@ofek
Copy link
Sponsor Collaborator

ofek commented Aug 12, 2022

Awesome, documented! 9e4811f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants