Skip to content

Problems with check_env.py #490

@MathewBiddle

Description

@MathewBiddle

In preparing for my teaching demo next week 😳 I've been reviewing the instructor notes for this lesson and came across two problems with check_env.py.

  1. When I run python check_env.py it fails with the message AssertionError: Anaconda is NOT installed as your default version of Python. Please make sure that is in accordance with the instructions provided.
    1. I think this can be resolved through a PR by adjusting
      assert 'anaconda' in sys.prefix, ("Anaconda is NOT installed as your "
      to indicate Anaconda (note the capital A). As that is now how the structure is created with the Anaconda distribution. There is probably a cleaner way to do this, however I think that will fix for now.
  2. Why is ggplot required for this workshop? Shouldn't that be plotnine?
    packages = ['numpy', 'matplotlib', 'pandas', 'jupyter', 'ggplot']

I can submit a PR to make these changes, if they are appropriate.

As a side note, it might be helpful to provide an environment.yml file in the setup as well. I looked around and couldn't find anything (although there is a lot of material to cover here, so I might have missed it). If it's of interest, this is what I have so far:

name: python-ecology-lesson
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.8
  - jupyter
  - pandas
  - numpy
  - matplotlib
  - plotnine

Which could be built with $ conda env create -f .\environment.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:enhancementPropose enhancement to the lesson

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions