Latest / Talk Python To Me / #94: Guarenteed packages via Conda and Conda-Forge
Transcript
- 0:00Have you ever had trouble installing a package you wanted to use in your Python app?
- 0:03Likely it contained some odd dependency, required a compilation step,
- 0:07maybe even using an uncommon compiler like Fortran?
- 0:10Did you try this on Windows?
- 0:12How many times have you seen cannotfindvcvarsall.bat before you have to take a walk?
- 0:17If this sounds familiar, you might want to check out the Conda Package Manager,
- 0:21Anaconda, the distribution, Conda Forge, and Conda Build.
- 0:25Together, these dramatically lower the bar for installing packages across all the platforms.
- 0:30This week, you'll meet Phil Ellison, Kale Franz, and Michael Sarahan,
- 0:34who all work on various parts of this ecosystem.
- 0:37This is Talk Python To Me, episode 94, recorded December 14, 2016.
- 0:43Welcome to Talk Python To Me, a weekly podcast on Python,
- 1:11the language, the libraries, the ecosystem, and the personalities.
- 1:14This is your host, Michael Kennedy.
- 1:16Follow me on Twitter, where I'm @mkennedy.
- 1:18Keep up with the show and listen to past episodes at talkpython.fm,
- 1:22and follow the show on Twitter via at Talk Python.
- 1:25This episode is brought to you by MongoDB and Continuum Analytics.
- 1:29Thank them both for supporting the show by checking out what they have to offer during their segments.
- 1:34Kale, Michael, Phil, welcome to Talk Python, guys.
- 1:38It's great to have you here.
- 1:39Thanks, Michael.
- 1:40Thank you.
- 1:40Great to be here.
- 1:41I'm looking forward to talking about Conda.
- 1:43It's going to be really fun.
- 1:44There's a whole ecosystem growing up around it,
- 1:47and I think it's a little bit underappreciated just from the people I talk to,
- 1:51and so I really want to spread the word about how cool Conda is and what you can do with it.
- 1:56So we'll get to all that, but let's start with your guys' story.
- 1:59How have you gotten into programming?
- 2:00Since there's three of you, let's kind of keep it a little bit short,
- 2:03but just, Kale, maybe how do you get into programming in Python?
- 2:0530 seconds.
- 2:06Yeah.
- 2:07In grad school, I was writing a lot of MATLAB code, and then MATLAB is proprietary,
- 2:13and this thing called NumPy came along and started using NumPy, and it kind of grew from there.
- 2:18Oh, that's really cool.
- 2:19Now you're at the very center of the nucleus of NumPy and all that kind of stuff.
- 2:25That's great.
- 2:26Michael, how about you?
- 2:27Yeah, I started out with a web program to show my photos to my parents and family,
- 2:33and then grew into science stuff when I went to grad school, much like Kale.
- 2:37So, yeah.
- 2:38Nice.
- 2:39What did you study in grad school?
- 2:40Electron microscopy.
- 2:41Electron microscopy.
- 2:43Okay, wow.
- 2:43Very cool.
- 2:44Lots of very small things, huh?
- 2:46Yeah.
- 2:47Was that like image recognition and things like this?
- 2:50Yeah, and also spectral processing, so all kinds of fun signal processing and unsupervised learning.
- 2:56Oh, okay.
- 2:57Very cool.
- 2:57Phil, how about you?
- 2:59So, I started pretty young.
- 3:00I started with Visual Basic when I was about 14, and then at university, I did quite a bit of Maple,
- 3:08which is kind of a mathematical language pretty similar to SimPy,
- 3:12and then picked up Python when I was in my gap year in France.
- 3:16I just loved the open source community, loved the scientific Python space, and went from there.
- 3:22Yeah, that's excellent.
- 3:23So, you were kind of bumming around Europe, and most people just hang out and chill,
- 3:27and you picked up Python.
- 3:28Very cool.
- 3:29Yeah.
- 3:30Awesome.
- 3:31Okay, so let's get into Conda first, and then we can get into Conda Build, Conda Forge,
- 3:38and the various things around it.
- 3:39So, Kale, tell us, what is Conda?
- 3:42Conda's a package manager.
- 3:43Install software and use software.
- 3:47It does a lot more than just manage packages.
- 3:49It manages environments.
- 3:52So, there's Conda inv, or there's an environment manager and the concept of environments, much like Python virtual inv, except it's system level, and it's Python agnostic, the environment part.
- 4:04Oh, it's language agnostic.
- 4:07So, you can have environments for, I mean, if you want to build Ruby with it, or whatever types of environments you want, completely supported.
- 4:14So, yeah, it's package manager.
- 4:16Very nice.
- 4:17So, it's kind of like pip in some of its role, but it does more, right?
- 4:21In some ways it does more.
- 4:22In some ways it does less.
- 4:24So, Conda and the Conda ecosystem is not the canonical source of truth for Python packages.
- 4:30That's PyPI, and we don't install packages directly from PyPI.
- 4:34That's pip's job.
- 4:36We don't pretend to.
- 4:38But we're much more like, in some ways, more like a system package manager.
- 4:41So, more like apt-get or yum or something like that.
- 4:45A lot of times with a system manager you'll install Python or you'll install some of your core dependencies.
- 4:50The harder things that pip will invoke a compiler for and things will crash or things like that.
- 4:57I have wheels help now, but pip still can't install Python.
- 5:00So, things that are a little bit lower level is where Conda really excels at.
- 5:06And then, so, yeah, that's the tradeoff in capabilities, I guess.
- 5:10Sure.
- 5:10And let's see if I got the origins correctly.
- 5:14I'll tell you what I think and then you tell me whether I'm right or wrong.
- 5:16So, I feel like Conda came from sort of two places.
- 5:20It feels like it came from you guys wanted to make it easier for data scientists and people, more correctly,
- 5:25people working with the data science and scientific tools like NumPy and so on to actually start working with them.
- 5:31Because they often had really freaky builds.
- 5:34So, like they might depend on some sort of Fortran thing.
- 5:36And so, in order to pip install, you have to have like a Fortran compiler.
- 5:40A Fortran compiler.
- 5:40Yeah, yeah.
- 5:41Which, I mean, we're already battling with where is vcvars.bat again on Windows?
- 5:46And now you're talking about Fortran compilers?
- 5:48Come on.
- 5:48So, is that sort of where it came from?
- 5:51And it had to manage all these different things like Fortran, for example?
- 5:54Yeah, that was the genesis.
- 5:55And Conda came about about the same time as wheels came about.
- 6:00So, there's a little bit of two different approaches.
- 6:03But they've sort of diverged into really pip and wheels and things being Python specific.
- 6:10And these source of truth for Python if there's not a more downstream distributor.
- 6:16Whereas Conda, we do take care of all the hard parts.
- 6:19So, NumPy and SciPy and all those dependencies.
- 6:23And then Python and all the runtimes and stuff like that.
- 6:26Yeah.
- 6:27And one of the big differences is that you guys pre-build the binary pieces that we might need, right?
- 6:35Yeah, that's correct.
- 6:36So, a lot of times people ship to production and absolutely do not want compilers on their production systems.
- 6:42And so, we do ship binaries.
- 6:44Yeah, I find that to be really excellent.
- 6:46Because, you know, like if I go and get SQLAlchemy or I think PyMongo even, some of these things that have C speedups at various places, often for like deserialization and serialization steps.
- 6:57And if I don't have the right setup, you know, maybe it's not going to work.
- 7:01Especially if I'm on Windows, for some reason that gets a little harder to do and gets neglected often.
- 7:06And so, it makes it like doubly hard, right?
- 7:08Sure.
- 7:09And those things you don't have to worry about if I Conda install it, right?
- 7:12Because it's already been compiled somewhere else by you guys.
- 7:14Not only do you not have to worry about that, but you can Conda install Postgres or all of your other general dependencies.
- 7:21It's not just Python.
- 7:22We have a huge R ecosystem.
- 7:24There's plenty of other ecosystems that people are, language interpreter ecosystems that people are building up around.
- 7:30Okay.
- 7:31And I guess another point about Conda versus a system package manager like YAM or apt-get is for your application code, you rarely want to be running the system Python.
- 7:41You always want to have an application-specific Python.
- 7:44And the OS package managers don't make that as easy.
- 7:48You basically have to make your own RPMs or something like that.
- 7:50Conda allows these isolated environments.
- 7:53Yeah, it absolutely does.
- 7:54That's very cool.
- 7:55Very cool.
- 7:56Okay.
- 7:56So, how does Conda relate to Anaconda?
- 8:00Sure.
- 8:01Anaconda is a distribution.
- 8:03There's an Anaconda distribution that is a set of packages that we ship about every quarter.
- 8:08That is the easy way for scientists and engineers, data scientists, PhD students all over the world, to install most of the core Python packages that they'll need.
- 8:20To do that, and the package manager part then is Conda.
- 8:23And so you get Conda, and then when you need to install other packages from any of our repositories or anaconda.org or anything like that,
- 8:31Conda is the command to extend what you install with the Anaconda distribution.
- 8:37Okay, so Anaconda is like all that stuff pre-packaged, pre-compiled, like the major tools you want.
- 8:42And Conda is the package manager for it.
- 8:45Nice.
- 8:45Phil, how about Conda Forge?
- 8:47Where does Conda Forge relate to all this?
- 8:50So, if you see Anaconda as a nice bundled set of packages to install Python and all of its dependencies,
- 8:58then Conda Forge is essentially doing the same thing,
- 9:01except Anaconda is managed by Continuum, and Conda Forge is a community effort.
- 9:07to kind of collaboratively to package this stuff.
- 9:10There are so many packages out there, right?
- 9:12I mean, just like you guys said, Conda is more than just Python.
- 9:15But just in Python, there's over 90,000 packages on PyPI, which is crazy, right?
- 9:20So, you probably can't manage all of that yourself, right?
- 9:25No.
- 9:26And so Conda Forge is to help crowdsource that, open source that a little bit.
- 9:29Yeah, exactly.
- 9:29It's not reasonable for us to expect Continuum to package all of this stuff.
- 9:34It just simply doesn't scale in that way.
- 9:36We needed a community effort to package some of the things that Continuum aren't necessarily ever going to package.
- 9:43At the end of the day, they're a business, and they're there to supply their customers.
- 9:48And that doesn't necessarily cover everybody who has various bespoke packages that need to be shipped.
- 9:55Yeah, absolutely.
- 9:55There's probably a very quickly small niche tale that sort of develops, right?
- 10:01There's probably 500 or 1,000 packages that are super important, and then it becomes really niche quickly after that, right?
- 10:08Absolutely.
- 10:08That's where Conda Forge started, really.
- 10:10I'm the author of several niche packages, which are extremely powerful for the people that it's targeting.
- 10:18But by no means would you expect that to be packaged by a company who are there, ultimately, to sell a product to their customers.
- 10:27That product may be freely available, but we don't have, as a community, we don't have control of what's packaged and how it's packaged.
- 10:35Sure.
- 10:36Yeah, that makes a lot of sense.
- 10:37So I guess I didn't really ask, what is Conda Forge?
- 10:40Maybe give people a quick definition so they know what we're talking about.
- 10:44Okay.
- 10:45So Conda Forge, in the same way that Anaconda is a bundle of pre-compiled Conda packages, Conda Forge is exactly the same thing.
- 10:55It's a channel that you can enable using the Conda package manager to install all of your favorite tools.
- 11:02And if your tools aren't available on that channel, then it's a community effort, and you're welcome to contribute your package to be bundled into the Conda Forge community and make it widely available to Conda users.
- 11:18Right.
- 11:19Okay.
- 11:19Yeah, we'll definitely dig into that more and how you can do that in a little bit, but that's great.
- 11:24And so in order to deliver things in a binary form, basically compiled for Windows, compiled for Linux, compiled for macOS, and things like that, you guys probably have some pretty interesting build infrastructure.
- 11:40Michael, do you want to talk about that?
- 11:41Oh, sure.
- 11:42Yeah.
- 11:42So we have a lot of different build machines.
- 11:45And so one of the main advances that Conda Forge has done is to take advantage of many of the free continuous integration services that are on the web.
- 11:56And so Phil figured out really, really clever ways to get around the different limits that those CIs present.
- 12:03So he thought, oh, well, you know, it's not going to work to build an entire repository of recipes.
- 12:09So can I instead break up the one repository into one recipe per repository?
- 12:16And that was a really clever workaround that made it possible to use those CIs as infrastructure.
- 12:22So that's part of it.
- 12:25At Continua, we just have kind of a standard build system where we try to maintain compatibility with older frameworks because we support customers with old CentOS 5 and RHEL 5 systems.
- 12:38But other than that, it's the same kind of idea.
- 12:41Okay.
- 12:41And you build it for, I can see how you would set up CI on Windows pretty easily.
- 12:46I see how you set up on Linux really easily.
- 12:47What about Mac?
- 12:49So Mac is...
- 12:51It's got to be a story behind that laugh, right?
- 12:54Well, it's a little bit more awkward.
- 12:57And the main reason why it's awkward is just Apple licensing.
- 12:59They don't let you run virtual machines on anything but Apple hardware.
- 13:03And so the number of people who are offering particularly free services with Apple builds is much more limited.
- 13:11And that said, you can get it on both CircleCI and TravisCI.
- 13:14And so we use TravisCI for Condo Forges Mac builds.
- 13:18Okay.
- 13:18Yeah.
- 13:19I mean, there are a few places.
- 13:20Like there's a place called Mac Mini Colo where you can get a bunch of Mac minis and stick them in some data center and they'll like run them for you.
- 13:28But yeah, it definitely makes it harder.
- 13:29But you guys found some kind of cloud service that you can use.
- 13:32You don't have like a closet full of Macs?
- 13:34At Continuum, we do have a closet full of Macs.
- 13:37Okay.
- 13:37Great.
- 13:38But I really think this binary distribution thing is really excellent because certainly when you're getting started, it's frustrating to deal with the single compile, the single install.
- 13:50So just knowing that it's always going to work is great.
- 13:54But also the speed, right?
- 13:55You can install stuff much quicker because you don't have to wait on a build.
- 13:58Yes, certainly.
- 13:59So if you're a Linux nerd, then it's kind of Gintu versus Ubuntu, right?
- 14:05Yeah.
- 14:05Yeah, yeah.
- 14:06Very nice.
- 14:06So you have a lot of different places where code is running.
- 14:10We talked about the three major OSs.
- 14:12Do you have compatibility for others?
- 14:15You talked about older systems, for example.
- 14:17How do you keep that all straight?
- 14:19Well, that's a really hard thing, actually.
- 14:22So the way that things are compatible varies by platform.
- 14:26And so for Mac, we kind of have to target an older platform, and then it's forward compatible.
- 14:31Windows is a weird story because on Windows, the Python version is pretty strongly tied to a particular version of Visual C++.
- 14:40And so that's limiting in terms of what kind of code people can actually compile.
- 14:46What version do you know?
- 14:47Sure.
- 14:48Yeah.
- 14:48So Python 2.7 requires Visual Studio 2008.
- 14:52And that's just kind of a custom because that's what the upstream Python.org build is.
- 14:57And so in order to maintain binary compatibility, it's a good idea for everybody to keep that matchup.
- 15:04But as a result of that, people can't really build C++11 software for Python 2.7 without mixing these runtimes.
- 15:13And when you mix runtimes, it's just kind of it might work.
- 15:17It might not.
- 15:18You're kind of asking for instability.
- 15:20Yeah.
- 15:20No kidding.
- 15:21It is too bad because C++ has actually had a bit of a renaissance, right?
- 15:24Absolutely.
- 15:25And 2008 misses.
- 15:26That renaissance, that's too old for it.
- 15:28Okay.
- 15:29Interesting.
- 15:30Interesting.
- 15:30Can you, any of you guys want to jump in on this?
- 15:33Talk about some of the challenges for community packaging.
- 15:36Like, if I'm getting binary code delivered to me, how do I trust it?
- 15:40Is that really different than trusting the source coming out of PyPI?
- 15:44Sure.
- 15:44I'll chime in a little bit.
- 15:46I would say it's not any different from getting it from PyPI, except that if you get it from PyPI, you can at least inspect the source.
- 15:54Whereas if you've got a binary blob, you have to have a different level of trust.
- 15:58I think there's one extra level to that because PyPI, it is the original package maintainer that's uploading the package to PyPI, right?
- 16:07We're taking from PyPI and we're downstream from that.
- 16:10So there is an extra level of people in between.
- 16:14On top of that, anybody can upload anything, any package they want to, to Anaconda.org.
- 16:19It's up to the user to decide whether they want to use it or not.
- 16:22And so there are some challenges there.
- 16:25There's also a question of reproducibility in the sense that if you're getting the source, you can compile it anywhere, right?
- 16:31But if you're getting a binary and you want to go and change your machine, then you're kind of, you're missing out on the ability to rerun that compile step where you choose.
- 16:41Yeah.
- 16:41So if you get a new machine, you're always going to have to go back to install via Conda.
- 16:46You can't just copy the files over and regenerate it or something.
- 16:50If you're on different architectures, for sure, you need to go and refetch the appropriate artifact for your hardware.
- 16:56Yeah.
- 16:56Okay.
- 16:57That said, do you guys do, you know, I had Travis Oliphant on one of the earlier shows and I feel like he said that you guys did some verification that at least the stuff that ships with Anaconda,
- 17:12mixes well together that one package that depends on another, you know, that those are compatible versions.
- 17:18Is that right?
- 17:19Right.
- 17:19We do a lot of that.
- 17:20And so we have our own kind of automated scripts that test our whole system together.
- 17:26And then Conda Forge sort of does that in a more distributed way to say when they build a package, they run the test suite.
- 17:33We also do that.
- 17:34We run a few other consistency checks.
- 17:36But those are the kinds of things that let us make sure that everything is playing well together.
- 17:41I'd add there that the Anaconda distribution is extensively, we release it about quarterly and it's extensively tested manually.
- 17:48We have a whole QA team that goes through that and make sure that each package works with, or each of the packages, however many that make up the full distribution work together.
- 17:58So yeah, there's a lot of extra testing that goes into the distribution.
- 18:01Yeah, I think that's really great.
- 18:03I think that's one of the big values, not just that you don't have to be able to compile stuff to install it, but that it's taken as a whole somewhat.
- 18:10You can trust it rather than here's a hundred little pieces.
- 18:13Individually, they're probably fine.
- 18:15How are they as a put together, right?
- 18:17Yeah, the downside of that is when you install the Anaconda district, Conda install Anaconda, you're explicitly pinning all of your versions or all of your packages to a specific version.
- 18:27And then when you want to update everything, people get confused about, I was looking for the most recent version of Jupyter and I said update all.
- 18:35Why didn't I get the most recent version of Jupyter?
- 18:37So there's a little bit of a downside.
- 18:39That is a bit of a downside, I guess.
- 18:41I did notice that.
- 18:42One of the things I was playing around with was trying to use Conda for my web apps.
- 18:47I noticed some of the web frameworks were farther out of date with what I got out of there than I guess I'd like.
- 18:54Can you talk about that?
- 18:56Whoever has the best info, I guess, on how do we like as things evolve?
- 19:01You know, so suppose I've got some package put into Conda Forge.
- 19:05How does the versioning on PyPI map into Conda Forge?
- 19:10Yeah, I'll try to shoot that.
- 19:12It's a manual process to update the recipe that creates the Conda package.
- 19:17And so someone has to update the recipe on the staged recipes or on the feedstock on Conda Forge.
- 19:25And then it's built out automatically by the CIs, which is great.
- 19:30The CIs save you a lot of effort.
- 19:32At Continuum, we don't have our CIs quite working yet.
- 19:35And so it's really a much more manual process to edit the recipe and then build out each of the different packages.
- 19:42With that level of effort, it's just a matter of first noticing that there is a new version available and then doing the work to package it up.
- 19:50Sure.
- 19:51In the defense of Anaconda versus Conda Forge here, there is clearly a huge overlap between what Anaconda does and what Conda Forge does.
- 19:59From someone who's not part of the Anaconda team, I just want to say how much of a great job the Anaconda team actually do in providing a really coherent, well put together set of packages that you can trust, you can rely on.
- 20:14They're stable.
- 20:15And really, I guess that's the big selling point of Anaconda.
- 20:20And Conda Forge really isn't trying to be in that space at all.
- 20:24What it wants to be is the kind of the leaner, faster moving community effort.
- 20:29But there is no chance that Conda Forge can be as well curated.
- 20:33It can't provide the indemnity that you get from Anaconda.
- 20:37As a distribution, Anaconda is just an amazing resource to have in the community.
- 20:41Yeah, and it ships quarterly, so it's probably, you know, if you're willing to wait an extra month, you'll be on the new version of a lot of things anyway.
- 20:49If I'm an author of a popular open source package that's either in Anaconda or Conda Forge, what can I do to make sure that the latest possible version is there, given that I have to accept the release cycles and stuff?
- 21:03But what do I do?
- 21:04Is there a place I talk to you guys, or what's the story?
- 21:07We both have places to submit pull requests to recipes.
- 21:11And so for the internal, for Anaconda, it's a recipe or a repository called Anaconda Recipes.
- 21:19And then for Conda Forge, it's going to be the feedstock for whatever you want to improve.
- 21:25If you want to add it, that's a staged recipes PR.
- 21:28Absolutely.
- 21:29Okay, so let's maybe talk about the recipes and feedstocks and stuff a little bit.
- 21:33I have one more comment that I might have given the wrong impression about the distribution shipping quarterly.
- 21:39The distribution is like one installer, one big meta package that has all kinds of stuff in it.
- 21:45We're constantly updating.
- 21:47I mean, Conda Forge too, but our source, our default repositories, we're updating all the time.
- 21:52And you don't have to wait for the quarter to come around to get more recent packages most of the time.
- 21:58Oh, yeah, yeah.
- 21:58Okay.
- 21:58It's just the Anaconda distribution and the big Anaconda meta package is updated once a quarter.
- 22:05Those are the packages that get all the extra QA and making sure that they all put together and stuff.
- 22:10I see what you mean.
- 22:10So like the DMG I got from my Mac, that thing is updated quarterly.
- 22:14But you're right.
- 22:15When I run a little green circle thing, the sort of overall environmental manager, that thing, I can go and update stuff as they come.
- 22:25I remember doing that quite more frequently.
- 22:27That's cool.
- 22:28Let me take just a moment and tell you about a sponsor of this episode.
- 22:33Anaconda Con 2017 is the first conference for open data science leaders around the world
- 22:38and the definitive gathering place for the Anaconda crew.
- 22:41Whether you are a new or longstanding member of the community focused on business or technology,
- 22:46Anaconda Con will help you conquer your biggest data science challenges.
- 22:50Data science is a team sport.
- 22:51That's why they're offering you two tickets for the price of one to Anaconda Con 17 starting now until January 16th.
- 22:59Register today at talkpython.fm/acon to take advantage of the spectacular savings.
- 23:04You'll get two tickets for the price of one,
- 23:07and you'll have the lovely tech-oriented city of Austin, Texas to share with your friend and all the top data scientists.
- 23:12Yeah.
- 23:14So let's talk about these recipes just a little bit.
- 23:17So let's focus on Condo Forge for a minute.
- 23:19If you go there, you can go to github.com/condo-forge, I think.
- 23:24And you've got, yeah, you've got a couple of repos.
- 23:28One of them is feedstocks, and that's where the accepted, those are the accepted sources that you guys pull from, right, to build packages?
- 23:37Right.
- 23:38We have a repo which holds, using Git submodules, every single individual feedstock repo that lives in Condo Forge.
- 23:47So the feedstock is the place where the recipe is stored canonically, and that has continuous integration enabled.
- 23:57So whenever we make changes to that recipe, it goes away, and it builds it each time and makes that artifact available on the Condo Forge channel.
- 24:03Okay.
- 24:04Maybe tell us what is a recipe.
- 24:06You've got a couple of pieces that make that up, right?
- 24:09Sure.
- 24:09Mike, do you want to talk about recipes?
- 24:11Yeah.
- 24:12A recipe is a YAML file, for one thing, and it's just kind of a way of expressing a standard of how you tell Condo Build or any other program that interprets that YAML file.
- 24:27Where you go to build the source, what are your build options, what are the instructions that you carry out to actually do the source,
- 24:34and then one thing that we're adding in is how do you package the source after you've built it,
- 24:38because some of the time you want to package different parts of what you've built into different packages.
- 24:45I see.
- 24:45That makes sense.
- 24:46So if basically we go to GitHub and there's a link to a submodule that gets pulled in for each one of these,
- 24:53if it's somewhere else other than Git, like Subversion, is it still possible to stick it in there,
- 25:00or does it have to be copied over to a GitHub repo or something?
- 25:04Condo Forge is based around the GitHub stuff, but there's no intrinsic limit to Condo Build as to where a recipe has to come from.
- 25:12Right.
- 25:12Okay.
- 25:13Well, let's talk quickly about Condo Build.
- 25:15Michael, you're also in charge of that, right, or working closely with that?
- 25:19Yes.
- 25:19So what's the story there?
- 25:21Like, if I want to take a package and build it with Condo Build, I've got to put together the recipe for it to work.
- 25:28I've got to obviously have the sources.
- 25:30And then I get it set up and I give it to you guys and you ship it off to CI on various platforms to build out the various versions or what happens?
- 25:38Yeah.
- 25:38Condo Build is really just a lot of orchestration of environment setup.
- 25:44And so building up a build environment is pretty hard.
- 25:48There's a lot of different pieces that go into that.
- 25:50And so in previous jobs as a software developer, setting up your workstation takes a day or two.
- 25:57So what Condo Build is really for is abstracting that away and taking advantage of Condo environments to make that setup be very seamless.
- 26:06And so you list your requirements at build time and at runtime in that YAML file.
- 26:12And then Condo Build goes and installs that stuff.
- 26:16And it is also doing a lot of kind of housekeeping as far as downloading the source and making sure that it's clean and then putting it in the right place and putting your prompt in the right place and activating VC Verazol, for example.
- 26:32And just taking care of all of those details for you so that you don't have to learn to do it yourself or don't have to put up with doing it yourself.
- 26:40That's nice.
- 26:41So if I can get my thing to build on one platform, how hard is it to get it to build on all the platforms?
- 26:47It depends heavily on which package.
- 26:50I mean, some packages support all platforms pretty well, pretty natively.
- 26:55But for example, some packages that really depend very heavily on Unix tools take a little bit more handholding on Windows.
- 27:02There's a lot of other build tools that make life easier.
- 27:05So for example, CMake is something that you always get really happy when you see that somebody's using that because it makes it much easier to do cross-platform builds.
- 27:15Whereas some other projects will say, oh, I've got a make file for Unix stuff, so Linux and Mac.
- 27:21And then on Windows, I've got this Visual Studio 2010 solution file.
- 27:27So if you're on Visual Studio 2008, you probably can't use it.
- 27:31If you're on 2015, you have to update it.
- 27:33And maybe it works.
- 27:34Maybe it doesn't.
- 27:35So that's the kind of thing where some projects are a lot easier than others.
- 27:41I would add, though, that for Python in particular, the recipe is usually trivial.
- 27:47It's usually mostly just there's usually about three files.
- 27:51There's a meta.yaml that is kind of like setup.py, except we use setup.py.
- 27:55And then your build script is mostly just Python setup.py install.
- 28:00And most of the time, you don't even include that.
- 28:04If you look at most of the Python-based recipes on Conda Forge, there's just a single command to run that setup.py command in the meta.yaml file.
- 28:13I see.
- 28:14And that gets basically installed into that local Conda environment.
- 28:18Then you just grab what you got and ship it?
- 28:20Exactly.
- 28:21So what Conda Build is doing is taking a snapshot of the files after it creates the environment.
- 28:25And then another snapshot after it's done doing whatever you told it to do to install it.
- 28:31And then those are the files that make up your package.
- 28:34Okay.
- 28:34This is excellent.
- 28:35Yeah.
- 28:35So it sounds like the Conda environments play a super important role.
- 28:40And the fact that Conda can install the tool chain as well is really important in making this all work.
- 28:46Yes.
- 28:47It's not critical.
- 28:48So the tool chain being a Conda package is actually something that we're working on.
- 28:52You'll soon be able to install the compiler and the runtime libraries and all that stuff as dependencies.
- 28:59You can currently, just not very many people do it because it's not supported all that well.
- 29:03That's what we're moving towards our main way of doing things.
- 29:07And what that'll mean is it's just going to be incredibly easy to, you're just going to be able to volunteer your machine as a build worker.
- 29:15And as long as you have Conda build installed on it, it doesn't matter what else you have.
- 29:19It'll take care of it.
- 29:20Interesting.
- 29:20So you mean like I could go and just say, hey, I'm willing to donate some of my cycles and disk and bandwidth to be a build machine?
- 29:27Kind of like steady at home or protein folding, those things?
- 29:31Yes.
- 29:31That is the dream.
- 29:33And there's quite a few technical hurdles to get there, but it'll be really neat if we figure it out.
- 29:37That sounds awesome.
- 29:38Yeah, yeah.
- 29:39Very cool.
- 29:39Okay.
- 29:42So what are some of the challenges around, you know, linking all of these other GitHub or not necessarily GitHub, Git repos into like one sort of super master feedstock repo?
- 29:55You know, because you've got all the recipes, but they all either in the Conda or Conda Forge, like kind of link back to all these other places.
- 30:03Phil, do you want to answer that or should I?
- 30:05You're welcome to answer it.
- 30:07Okay, good.
- 30:08I think the hard part is how do you do the maintenance work?
- 30:11Because it works fantastically well to pull those submodules into one folder just as a view or as a consolidated place to work from.
- 30:21But then if you change any of the source code, Git submodules are just unwieldy at best for pushing those changes back to the parent repositories.
- 30:33So what Phil has created is fantastically useful for doing the editing on each repository.
- 30:41But if there were like, say, a lot of edits you wanted to apply across a lot of different repositories, that's the kind of change that would be kind of tedious and hard to do.
- 30:51Yeah, absolutely.
- 30:52So what's that tooling look like?
- 30:53We don't have any idea yet.
- 30:55We're still working on it.
- 30:57Just waiting for Phil to work his magic.
- 30:59Yeah, yeah.
- 31:00Please, Phil, figure that out.
- 31:01So on the Condor Forge front, we actually have a Heracuse service that's running periodically to re-render all of our feedstocks whenever we make kind of fundamental template changes to how a feedstock should look.
- 31:15And that service actually goes away, re-renders using the tools that we've built.
- 31:20And then if there are any changes, pushes a new pull request to be merged by the recipe maintainers on GitHub.
- 31:29So actually, it is tedious to have to make these changes to, like, we're up to 1,500 Git repos now.
- 31:37It is tedious if you need to make those changes, but there are some tools that we've developed to simplify that if it's kind of a universal change that's needed.
- 31:44Yeah.
- 31:44To clarify what a re-rendering is, that is just, like, a change to the CI setup work.
- 31:52And the re-rendering is to adapt the CI scripts to whatever the latest standard is.
- 31:57I see.
- 31:58Okay.
- 31:58Yeah.
- 31:58And what CI tools do you use?
- 32:00That's the AppVeer and the CircleCI and TravisCI.
- 32:05Okay.
- 32:05Yeah, yeah.
- 32:07Very nice.
- 32:07And when do you choose which, or do you use them all and sort of somehow use them in concert?
- 32:13Sure.
- 32:14That's something that Phil figured out, and he uses AppVeer for Windows and CircleCI for Linux and TravisCI for Mac.
- 32:21Phil, you want to explain why you made those choices?
- 32:24I mean, the choices were pretty straightforward, really.
- 32:26So, obviously, AppVeer is pretty much the only game in town for Windows continuous integration, or certainly was at the time.
- 32:33TravisCI is ubiquitous, and everyone knows it.
- 32:36And at the time, when we first developed CondorForge, there was either you could have very limited Mac builds or amazing Linux builds.
- 32:45But you can have both.
- 32:47So, we ended up having to go down the route of picking Travis for Mac.
- 32:59And then, yeah.
- 33:11And then, yeah.
- 33:13You know, we've got to go down the route of the app, but we've got to go down the route of the app.
- 33:25And then, yeah.
- 33:26So, yeah.
- 33:30So, yeah.
- 33:31Yeah.
- 33:31That's really great of them.
- 33:32Yeah.
- 33:33Yeah.
- 33:33Nice job.
- 33:35Do you think you guys, you think, on a forge or the recipes, Feedstock is what it's called, is the thing on GitHub with the most submodules?
- 33:46Oh, good question.
- 33:47Thanks.
- 33:48Yeah.
- 33:50We're up to 1,500 recipes.
- 33:52So, about 1,500.
- 33:54It's pretty high.
- 33:55It's got to be in the top five if it's not number one.
- 33:58I bet it's number one.
- 33:59That's really interesting.
- 34:01Really interesting.
- 34:03So, can you talk about the growth and some of the challenges, Phil, of CondorForge?
- 34:07Sure.
- 34:08So, I mean, we publicly announced CondorForge less than 12 months ago.
- 34:12And the uptake curve on it was crazy.
- 34:17In the first few months, we'd grown to 100 contributors and kind of 300 recipes or something like that.
- 34:24It really is quite amazing that the infrastructure scaled so well.
- 34:28I mean, we designed the architecture to have the ability to make lots of Git repos.
- 34:34But we had really no idea whether GitHub were going to limit the number of Git repos we could have under one organization.
- 34:40You know, the continuous integration services, we had no idea whether they'd be able to cope with so many kind of registered Git repositories.
- 34:47There were some real challenges that actually just fell out quite nicely.
- 34:52Yeah.
- 34:53It sounds like the tooling worked really well, actually.
- 34:55Yeah.
- 34:56As it became more and more mature, the bottleneck, it turns out, has not been the hardware.
- 35:01Actually, the biggest bottleneck probably is me.
- 35:04And just kind of developing the governance and the kind of delegated authorities to kind of make decisions without my intervention just takes time.
- 35:16And it's actually kind of the fluffy thing that's much harder than the software for me.
- 35:20There's no script for that, is there?
- 35:22No.
- 35:22There's no continuous integration service for that.
- 35:26Hey, everyone.
- 35:26Let me take just a quick moment and tell you about a new sponsor of the show, MongoDB University.
- 35:31MongoDB is one of the fastest growing job skills on the market.
- 35:34Long ago when I was getting into MongoDB, I took one of their free courses on Mongo University.
- 35:39It was a great way to get up and running with my first app.
- 35:42MongoDB University offers free seven-week courses on MongoDB designed to teach you everything you need to know about how to build a MongoDB-based app.
- 35:50This course will cover basic installation, JSON, schema design, querying, inserting data, indexing, and working with the Python driver, of course.
- 35:58After completing this course, you should have a good understanding how applications are built on top of MongoDB using Python.
- 36:05Plus, you'll have a great foundation for preparing for the MongoDB developer certification exam.
- 36:09I hope you can join me as a MongoDB University alumnus.
- 36:12Sign up for the free seven-week course at talkpython.fm/Mongo.
- 36:18Kale, let's talk a little bit about some of the projects under github.com/Conda.
- 36:23Sure.
- 36:23So there's a few that are interesting to me.
- 36:26There's Conda and then there's Constructor.
- 36:28What's the story of those?
- 36:30Yep.
- 36:31So there's Conda and CondaBuild.
- 36:32Those are the two big ones that we've been talking about.
- 36:35There's Constructor.
- 36:36And Constructor is actually a lot of what we use to build the single installer, the Anaconda Distribution installer, at least the .sh ones.
- 36:47And so it creates a self-extracting binary into a single .sh or executable file will unroll itself and install all those packages for you.
- 37:00That's what Constructor is.
- 37:01Some of the other ones, CondaM is on there, but it's deprecated.
- 37:05It's been pulled into the Conda repo now so that they can be tested together and shipped together and versioned together and stuff like that.
- 37:12There's Capsule repo.
- 37:14And Capsule is a bit of an experiment for Continuum right now.
- 37:18It's really focused on more managing data science projects, starting services that are dependencies for data science projects like Aretis database or something like that.
- 37:30So it takes all the ideas of Conda's package management, environment management, adds services, adds running processes to it, and then adds data to it as well.
- 37:41So data shape, schema, stuff like that.
- 37:44Wow.
- 37:44That sounds pretty interesting.
- 37:45So if I want to do something where I'm going to need a Jupyter Notebook server running, I'm going to need Redis, like you said, and a few other things, that could sort of do that all in one shot?
- 37:55And then in a portable way so that you can move projects around from a local dev environment to something that is sort of running in production and against your production database.
- 38:06Even Conda, one of the great things is it's completely OS agnostic, right?
- 38:11So being able to port your projects across OSs and share your projects that way too.
- 38:17Cool.
- 38:17How does that help for reproducibility?
- 38:19Like if I'm a scientist and I've written a paper, can I make a capsule thing and go, and this is the thing that will let you go and do it?
- 38:25I can see that happening.
- 38:26Yeah.
- 38:26Yeah.
- 38:27Very, very, very cool.
- 38:28The starting point, if you want to examine my data yourself, here's all the tools you need to do it.
- 38:35Run a command and you're in.
- 38:37Okay.
- 38:38Excellent.
- 38:39And Phil, how about the Conda Forge Conda Smithy thing on GitHub that you guys have?
- 38:44What's that?
- 38:45Right.
- 38:45So as I say, we've got like 1,500 recipes now that are sitting each in their own Git repository.
- 38:50And the Git repository that holds the recipe is called the Feedstock.
- 38:54And as you can imagine, there is duplication of things like the readme and the license and the continuous integration scripts.
- 39:02And we didn't want to have that kind of duplication where we had to manage that manually.
- 39:08So Conda Smithy really is the tool that is the cookie cutter, the templating engine that takes a recipe and turns it into this Git repository.
- 39:18I see.
- 39:19So if I owned a package and I wanted to get started, maybe I'd check out Conda Smithy to build what I'm going to start with?
- 39:25Yeah.
- 39:25Yeah.
- 39:25You can render your recipe into a feedstock and see how that would look.
- 39:30And actually, that's precisely what we do.
- 39:33The turn recipes proposed to Conda Forge into feedstocks.
- 39:39And the tooling in Conda Smithy also includes the ability to make the new GitHub repository.
- 39:44It registers all the webhooks.
- 39:46So you can kind of automatically register Travis, Circle, and AppFire continuous integration.
- 39:52It just kind of packages everything neatly into one place so that we don't have to repeat ourselves 1,500 times.
- 40:00Yeah, absolutely.
- 40:01And make it easier for people to contribute.
- 40:03All right, guys.
- 40:04Looks like we're running out of time.
- 40:05I think we might have to leave it there for Conda.
- 40:08But let me ask you each two questions.
- 40:11I always ask at the end of the show.
- 40:12Just there's three of you.
- 40:14You go kind of quick.
- 40:15First of all, there's over 90, I think 95,000 packages on PyPI and many of them on Conda Forge and within Anaconda.
- 40:24Can you each give me maybe one of your favorite packages that's not necessarily popular but you think is really cool that people should learn about?
- 40:31Phil, go first.
- 40:32I'm going to pick a package which is extremely popular but it's so exciting.
- 40:36I'm thrilled that it exists.
- 40:38My favorite package is Dask and Dask Distributed.
- 40:41I think it's just an amazing solution to a really big problem within the community.
- 40:47Yeah, so this is like for parallelizing data pipeline type processing?
- 40:50Right, exactly.
- 40:51Yeah, and parallel array computation.
- 40:55Just really exciting.
- 40:57All right, Dask.
- 40:58Dask, very cool.
- 40:59Cale?
- 40:59Yeah, the two packages that popped into my mind are Mahmoud Hashimi's Boltons.
- 41:04I love that.
- 41:05I use it all the time.
- 41:06And then Matt Rockland's PyTools, SciTools.
- 41:10Both fairly low level but both awesome libraries for writing general Python and using both all the time.
- 41:17Oh, excellent.
- 41:18Yeah, I've checked out Boltons.
- 41:19Not the other one.
- 41:20I'll have to have a look at that.
- 41:21They're both, you know, both sound great.
- 41:22And Michael?
- 41:23pytest.
- 41:25Yes, pytest.
- 41:27To make sure all these automated builds actually have some sort of meaning, right?
- 41:30Yeah.
- 41:30And also just all the plugins that go with pytest.
- 41:33Let it do incredible things in very expressive ways.
- 41:37I'm very, very thankful for pytest.
- 41:39Excellent.
- 41:39All right, Michael, when you write some Python code, what editor do you open up?
- 41:42SpaceMax.
- 41:43SpaceMax.
- 41:44All right on.
- 41:44Cale?
- 41:46For Python code in particular, it's PyCharm.
- 41:48PyCharm.
- 41:48Okay, cool.
- 41:49And Phil?
- 41:50I'm mostly a Vim user, even on Windows.
- 41:52Okay.
- 41:52Yeah, yeah.
- 41:53Very nice.
- 41:53And I guess the legitimate real Vim and the Unix tools are supposed to be there soon.
- 42:00Are they already there?
- 42:00I'm not sure.
- 42:01But the Unix...
- 42:02In Conda?
- 42:03No, no.
- 42:04In Windows 10, it's supposed to have the Ubuntu subsystem in it natively pretty soon.
- 42:10Maybe that'll even help with some builds.
- 42:11Who knows?
- 42:11But, yeah, yeah.
- 42:13Very cool.
- 42:13Do we have Vim for Conda?
- 42:15Has it been written?
- 42:16Does anybody know?
- 42:16I'm just curious.
- 42:17I don't know.
- 42:18I wrote Nano a long time ago.
- 42:21Is it on Conda Forge?
- 42:22Phil, do you have Vim compiled yet on Conda Forge?
- 42:25I know of.
- 42:26But then, you know, I'm completely out of the loop.
- 42:28Sounds like somebody should take that one on.
- 42:30Awesome.
- 42:30All right.
- 42:32Any final call to actions?
- 42:33Like, how can people contribute to this overall project that you guys are all working on?
- 42:36Vim for Conda Forge, apparently.
- 42:38That's step one.
- 42:39Oh, I have one.
- 42:40I released Conda 4.3.0 today.
- 42:44It's a huge feature release.
- 42:46It's over almost 900 commits past the 4.2 feature release or feature branch.
- 42:53It's released on.
- 42:55We have a Conda Canary program.
- 42:57So just like Chrome has a Canary program, I kind of ripped off the title.
- 43:00Plus, there's some alliteration.
- 43:01So Conda Canary.
- 43:02And you just add a Conda config, add channels, Conda Canary.
- 43:07You add the Conda Canary channel.
- 43:09Check it out.
- 43:10Use it.
- 43:11Let us know what you think of it.
- 43:13The changelog is extensive.
- 43:14And we'll be releasing it, general availability, probably on the last day of 2016.
- 43:20Oh, perfect.
- 43:21A nice New Year's gift.
- 43:22That's awesome.
- 43:22So yeah, people check that out.
- 43:23Anything else?
- 43:24I'd say if anybody is missing a package on Conda that is in PyPy and it would make your life easier,
- 43:31then please submit a recipe to Staged Recipes.
- 43:35And the main thing I would emphasize about Conda Forge is the really incredible thing about it is the community.
- 43:41There is such an amazing pool of expertise there on how to build software.
- 43:45And I've learned a lot.
- 43:47And anybody stands to learn a lot just by getting involved there.
- 43:50Okay, excellent.
- 43:51Yeah, absolutely.
- 43:52Easy to contribute and please do so.
- 43:54Any of you guys going to be at Anaconda Con in Austin in February?
- 43:58Oh, yes.
- 43:58Kale?
- 43:59We'll be around.
- 44:00Yep, absolutely.
- 44:00Nice.
- 44:01Phil, are you traveling like halfway around the world?
- 44:03Unfortunately, I won't be there for Anaconda Con this year.
- 44:06All right.
- 44:06So if people make it, go say hi to Michael and Kale and we can tweet.
- 44:10Tweet at Phil.
- 44:11All right, guys.
- 44:12Thanks so much for being on the show.
- 44:13It's been great to talk about Conda.
- 44:14I think it's a really great project overall that you guys are working on.
- 44:18So thanks for that.
- 44:18Thank you, Michael.
- 44:19Thank you.
- 44:20This has been another episode of Talk Python To Me.
- 44:24Today's guests have been Phil Ellison, Kale Franz, and Michael Sarahan.
- 44:29And this episode has been sponsored by Continuum Analytics and MongoDB University.
- 44:34Thank you both for supporting the show.
- 44:36Whether you want to hear the keynote by Ryan Curran from Forrester Research,
- 44:40meet the guys behind Anaconda, or just mingle with high-end data scientists,
- 44:44you need to find your way to Austin, Texas for Anaconda Con this February.
- 44:47Start at talkpython.fm/acon.
- 44:51Get the skills you need to build your Python apps on top of the most successful
- 44:55and in-demand document database at MongoDB University.
- 44:58Take a free class by visiting talkpython.fm/mongo.
- 45:02Are you or a colleague trying to learn Python?
- 45:05Have you tried books and videos that just left you bored by covering topics point by point?
- 45:10Well, check out my online course, Python Jumpstart,
- 45:13by building 10 apps at talkpython.fm/course
- 45:16to experience a more engaging way to learn Python.
- 45:19And if you're looking for something a little more advanced,
- 45:22try my WritePythonic code course at talkpython.fm/pythonic.
- 45:26Be sure to subscribe to the show.
- 45:29Open your favorite podcatcher and search for Python.
- 45:31We should be right at the top.
- 45:32You can also find the iTunes feed at /itunes,
- 45:36Google Play feed at /play,
- 45:38and direct RSS feed at /rss on talkpython.fm.
- 45:42Our theme music is Developers, Developers, Developers by Corey Smith,
- 45:46who goes by Smix.
- 45:47Corey just recently started selling his tracks on iTunes,
- 45:50so I recommend you check it out at talkpython.fm/music.
- 45:54You can browse his tracks he has for sale on iTunes
- 45:56and listen to the full-length version of the theme song.
- 45:59This is your host, Michael Kennedy.
- 46:01Thanks so much for listening.
- 46:02I really appreciate it.
- 46:03Smix, let's get out of here.
- 46:10I'll see you next time.
- 46:27Bye.
- 46:28you
- 46:28you