Kill signal when pulling conda environment

Hello, I’m having a bit of trouble configuring a conda environment. Below is my current build

version: 2.1
jobs:
  build:
    docker:
      - image: continuumio/miniconda3

    working_directory: ~/repo

    steps:
      # Step 1: obtain repo from GitHub
      - checkout
      # Step 2: create virtual env and install dependencies
      - run:
          name: install dependencies
          command: |
            conda env create -n test_env --file ci/conda_requirements.yml

      # Step 3: run linter and tests
      - run:
          name: run tests
          command: |
            conda init bash
            source ~/.bashrc
            conda activate test_env
            make all

When I run this, I get a kill signal with no other error messages. If there are other successful conda builds, links would be greatly appreciated :slight_smile:

Ok, I’ve ditched conda and now going with a pip install…

I’ve got the tests passing, but it’ll randomly fail with something like

#!/bin/bash -eo pipefail
make all
pep8 mavi setup.py --ignore=E731,E722,W503
make: pep8: Command not found
make: *** [Makefile:12: pep8] Error 127

Exited with code exit status 2
CircleCI received exit code 2

This is so bizarre, sometimes, it’ll pass, sometimes it decides not to. Seriously what is going on??

@mortonjt, did you install pep8?

pip install pep8

Hi @jcald1, thanks for following up.

Yes, pep8 was installed (the tests wouldn’t be randomly passing otherwise).

But I did figure out a consistently working solution, below is my config

version: 2.1

orbs:
  python: circleci/python@0.2.1

jobs:
  build-and-test:
    executor: python/default
    steps:
      - checkout
      - run:
          name: install hdf5
          command: sudo apt-get install libhdf5-dev
      # - python/load-cache
      - python/install-deps
      # - python/save-cache
      - run:
          name: install mavi
          command: pip install -e .
      - run:
          name: Test
          command: make all

workflows:
  main:
    jobs:
      - build-and-test

Note the commented lines. My best guess is that the install was working, the config works, so it was able to pass the first round of tests. But something is wonky with the caching, either the save or the cache loading is broken. So the ci is tricked into thinking things were installed when in fact they aren’t. If I remove these caches and install everything from scratch (everytime), things run as expected.

So I think my problem has been fixed. Happy New Years!