Learn how to configure a Python environment using CondaForge to ensure access to the most current versions of essential data science libraries. This article walks through setting up the environment, adjusting channel priorities, and installing key packages like Pandas and Dash.
Key Insights
- Configure your Conda environment to use CondaForge—a community-maintained repository offering the latest versions of Python packages—by setting it as the exclusive channel with strict priority.
- Activate the specific environment (e.g., DVENV) before running configuration commands like conda config --env --add channels conda-forge and setting channel_priority to strict.
- Noble Desktop recommends installing packages such as pandas, dash, and dash-bootstrap-components in the configured environment to support data visualization and analysis workflows.
This lesson is a preview from our Data Analytics Certificate Online (includes software). Enroll in this course for detailed lessons, live instructor support, and project-based training.
Now that we have a named Python environment, it's time for us to configure it and install some software. Now, installing software requires us to do a little bit of configuration first if we want to have the most up-to-date libraries. Now, there are times when you want specific versions, and there are times when you want to make sure that you are using a stable version.
For our purposes, we want the most up-to-date version of the Dash library and Pandas, and as a result, we're going to configure this environment to use CondaForge. CondaForge is a community-run repository for software, and it stands in contrast with the default built-in Anaconda repository. Anaconda's repository is what you would call a stable software repository.
It's designed for, hey, they've double-checked all of this software to make sure that it all plays well and plays well with each other, and that's very useful for, particularly if you're running servers, a business task where stability is vital. But when you are just running, doing data visualization, you actually want to use instead the most up-to-date software, and that's what CondaForge is there for. It's run by the Python community, and they keep the most up-to-date versions of all packages in there.
Okay, so we need to configure our environment, DVENV, to use CondaForge. Now, make sure that you have DVENV active. As you can see here, I do, and if you don't have it active, do conda activate DVENV.
Make sure DVENV is in your prompt where your cursor is, and then we're going to run a command, conda config, and we're going to tell conda config to configure this environment, dash-dash-env, not the general global environment or all environments, and we're going to add a channel, meaning a kind of a pipeline for getting software, and that channel is CondaForge. Mind your spaces, as always. That should give us, I believe, no reporting at all.
It'll just let us know when it's done by giving us back a prompt. There we go, and now we're going to do a similar line. We're going to say conda config this environment, and we're going to add a setting to always choose CondaForge exclusively.
And not go to any other channel, not use the default channel, and we're going to set the channel priority to strict is what that setting is. So we're going to say set channel underscore priority to strict, and as always, mind your spaces, and we'll have the same situation right back to our prompts. No reporting necessary.
It would have told us if it had messed up in some way. All right, now we're going to enter a command to install all the software we need, at least for our first part. We'll say conda install pandas, the very well-known pandas library, dash, one of the major libraries we'll use in this course, and a supplementary dash library that will explain when we use it, dash bootstrap components.
And hit return on that. Now this is going to take actually quite a while, and it will ask you, once it's got everything set up, it'll ask you, hey, do you want to proceed? And just like before, we'll hit return or Y and return to confirm that, yes, we want to install all this software. All right, I'm going to stop the video here, and when we come back, we will start writing some code and running it in this environment.