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.

CLN: Fixes to conda environment names

See original GitHub issue

We have some inconsistency regarding the names of the conda environment. At the moment, all environments for the CI are named pandas, and the environment created locally following the set up instructions (and using environment.yml) is named pandas-dev.

Then, inside several scripts (e.g. ci/code_checks.sh) we do a source activate pandas. Which means that the script works well in CI jobs, but it fails locally unless we also have a pandas environment locally.

Another thing is that in the CI config we use a CONDA_ENV environment variable, and we ignore the conda environment names in the yaml files.

What I would do is:

  • Use pandas-dev as the environment name in all our conda yaml files
  • Create the environments with the environment name in the used yaml file (do not override with -n $CONDA_ENV as we do now)
  • Do not use source activate inside the scripts (use it in the steps in the CI config files when needed). This way when running scripts locally, the current environment will be used

@jreback @TomAugspurger @jorisvandenbossche any objection?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
h-vetinaricommented, Nov 22, 2018

I’d like to add one more location to this: doc/source/style.ipynb For compiling the docs, I always have to change the name of the kernel in there, to make ipython use the right one:

  "metadata": {
   "kernelspec": {
    "display_name": "Python 3",
    "language": "python",
+   "name": "pandas-dev"
-   "name": "python3"
  },
0reactions
h-vetinaricommented, Nov 22, 2018

@TomAugspurger Yes, of course, but I don’t want my python3 kernel spec to point to the dev environment. If we’re already talking environment names (and the default from environment.yml), I think this is a reasonable adaptation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing environments - Conda
With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them.
Read more >
conda environment has no name visible in conda env list
Converting to Named Environment. The following are possible ways to enabling name-based activation. Option 1: Clone Into Directory. One option ...
Read more >
Moving Conda Environments - Anaconda
Conda provides multiple ways of reproducing project environments. Creating a clone of an environment can provide a custom base environment or ...
Read more >
Conda - Yale Center for Research Computing
Conda is a package, dependency, and environment manager. ... You should give your environments names that are meaningful to you, ...
Read more >
The Definitive Guide to Conda Environments
Using Conda Environments. Creating Environments. To create an environment with conda for Python development, run: % conda create --name conda- ...
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