Conda environment inconsistent

On a clean install of QR 2.5.0, I noticed that the conda environment is inconsistent out of the box. When attempting to install conda-build, conda tries to update/install the following packages to fix the env:

(base) root@b913d23331fa:/codeload# conda install conda-build
Collecting package metadata (current_repodata.json): done
Solving environment: \ 
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - https://repo.continuum.io/pkgs/free/linux-64::anaconda==4.4.0=np112py36_0
failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: - 
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - https://repo.continuum.io/pkgs/free/linux-64::anaconda==4.4.0=np112py36_0
done

## Package Plan ##

  environment location: /opt/conda

  added / updated specs:
    - conda-build


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _anaconda_depends-5.0.1    |   py36hd30a520_1           6 KB
    anaconda-custom            |           py36_1           3 KB
    backports.shutil_get_terminal_size-1.0.0|     pyhd3eb1b0_3          10 KB
    bkcharts-0.2               |           py36_0         133 KB
    bzip2-1.0.8                |       h7b6447c_0          78 KB
    ca-certificates-2021.1.19  |       h06a4308_1         118 KB
    certifi-2020.12.5          |   py36h06a4308_0         140 KB
    conda-4.10.0               |   py36h06a4308_0         2.9 MB
    conda-build-3.15.1         |           py36_0         447 KB
    dask-core-2021.3.0         |     pyhd3eb1b0_0         659 KB
    filelock-3.0.12            |     pyhd3eb1b0_1          10 KB
    glob2-0.7                  |     pyhd3eb1b0_0          12 KB
    gmp-6.2.1                  |       h2531618_2         539 KB
    gmpy2-2.0.8                |   py36h10f8cd9_2         150 KB
    graphite2-1.3.14           |       h23475e2_0          99 KB
    imageio-2.9.0              |     pyhd3eb1b0_0         3.0 MB
    intel-openmp-2019.4        |              243         729 KB
    json5-0.9.5                |             py_0          22 KB
    jupyterlab-1.0.2           |   py36hf63ae98_0         6.2 MB
    jupyterlab_launcher-0.13.1 |             py_2          23 KB
    jupyterlab_server-1.0.0    |             py_0          26 KB
    libedit-3.1.20210216       |       h27cfd23_1         167 KB
    libgfortran-ng-8.2.0       |       hdf63c60_1         1.3 MB
    libssh2-1.8.0              |       h9cfc8f7_4         213 KB
    lzo-2.10                   |       h7b6447c_2         184 KB
    mccabe-0.6.1               |           py36_1          14 KB
    mpc-1.1.0                  |       h10f8cd9_1          90 KB
    mpfr-4.0.2                 |       hb69a4c5_1         487 KB
    ncurses-6.2                |       he6710b0_1         817 KB
    openssl-1.0.2u             |       h7b6447c_0         2.2 MB
    pandoc-2.12                |       h06a4308_0         9.5 MB
    patchelf-0.12              |       h2531618_1          88 KB
    pkginfo-1.7.0              |   py36h06a4308_0          43 KB
    pycodestyle-2.7.0          |     pyhd3eb1b0_0          41 KB
    sphinxcontrib-1.0          |           py36_1           4 KB
    sphinxcontrib-websupport-1.2.4|             py_0          34 KB
    typing-3.7.4.3             |   py36h06a4308_0          12 KB
    webencodings-0.5.1         |           py36_1          19 KB
    ------------------------------------------------------------
                                           Total:        30.3 MB

The following NEW packages will be INSTALLED:

  _anaconda_depends  pkgs/main/linux-64::_anaconda_depends-5.0.1-py36hd30a520_1
  backports.shutil_~ pkgs/main/noarch::backports.shutil_get_terminal_size-1.0.0-pyhd3eb1b0_3
  bkcharts           pkgs/main/linux-64::bkcharts-0.2-py36_0
  bzip2              pkgs/main/linux-64::bzip2-1.0.8-h7b6447c_0
  ca-certificates    pkgs/main/linux-64::ca-certificates-2021.1.19-h06a4308_1
  conda-build        pkgs/main/linux-64::conda-build-3.15.1-py36_0
  dask-core          pkgs/main/noarch::dask-core-2021.3.0-pyhd3eb1b0_0
  filelock           pkgs/main/noarch::filelock-3.0.12-pyhd3eb1b0_1
  glob2              pkgs/main/noarch::glob2-0.7-pyhd3eb1b0_0
  gmp                pkgs/main/linux-64::gmp-6.2.1-h2531618_2
  gmpy2              pkgs/main/linux-64::gmpy2-2.0.8-py36h10f8cd9_2
  graphite2          pkgs/main/linux-64::graphite2-1.3.14-h23475e2_0
  imageio            pkgs/main/noarch::imageio-2.9.0-pyhd3eb1b0_0
  intel-openmp       pkgs/main/linux-64::intel-openmp-2019.4-243
  json5              pkgs/main/noarch::json5-0.9.5-py_0
  jupyterlab         pkgs/main/linux-64::jupyterlab-1.0.2-py36hf63ae98_0
  jupyterlab_launch~ pkgs/main/noarch::jupyterlab_launcher-0.13.1-py_2
  jupyterlab_server  pkgs/main/noarch::jupyterlab_server-1.0.0-py_0
  libedit            pkgs/main/linux-64::libedit-3.1.20210216-h27cfd23_1
  libgfortran-ng     pkgs/main/linux-64::libgfortran-ng-8.2.0-hdf63c60_1
  libssh2            pkgs/main/linux-64::libssh2-1.8.0-h9cfc8f7_4
  lzo                pkgs/main/linux-64::lzo-2.10-h7b6447c_2
  mccabe             pkgs/main/linux-64::mccabe-0.6.1-py36_1
  mpc                pkgs/main/linux-64::mpc-1.1.0-h10f8cd9_1
  mpfr               pkgs/main/linux-64::mpfr-4.0.2-hb69a4c5_1
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  pandoc             pkgs/main/linux-64::pandoc-2.12-h06a4308_0
  patchelf           pkgs/main/linux-64::patchelf-0.12-h2531618_1
  pkginfo            pkgs/main/linux-64::pkginfo-1.7.0-py36h06a4308_0
  pycodestyle        pkgs/main/noarch::pycodestyle-2.7.0-pyhd3eb1b0_0
  sphinxcontrib      pkgs/main/linux-64::sphinxcontrib-1.0-py36_1
  sphinxcontrib-web~ pkgs/main/noarch::sphinxcontrib-websupport-1.2.4-py_0
  typing             pkgs/main/linux-64::typing-3.7.4.3-py36h06a4308_0
  webencodings       pkgs/main/linux-64::webencodings-0.5.1-py36_1

The following packages will be UPDATED:

  certifi                anaconda::certifi-2020.6.20-py36_0 --> pkgs/main::certifi-2020.12.5-py36h06a4308_0
  conda                        anaconda::conda-4.9.0-py36_0 --> pkgs/main::conda-4.10.0-py36h06a4308_0
  openssl                       pkgs/free::openssl-1.0.2l-0 --> pkgs/main::openssl-1.0.2u-h7b6447c_0

The following packages will be SUPERSEDED by a higher-priority channel:

  anaconda            pkgs/free::anaconda-4.4.0-np112py36_0 --> pkgs/main::anaconda-custom-py36_1


Proceed ([y]/n)? n


CondaSystemExit: Exiting.

If you proceed with the fix, zipline will fail to start the next time the container is restarted (I think it's some conflict with dask-core). This makes it impossible to manage Python packages using conda. I think previous versions of QR had inconsistent conda environments, but either QR 2.5 has a change that's more sensitive or some downstream dependency is causing a new failure.

Zipline is very sensitive to versions so customizing the environment is not officially supported. A better approach is to run your custom requirements in a satellite container, which you can call from Zipline.

Thanks for replying.

I'm not sure using the satellite container would help for this use case. We use common code for a couple different algos, and want to use conda develop <package> (which requires installing the conda-build package) to install the dependencies in development mode. We'll look at other workarounds unless I'm missing something about how to have the libraries sit on satellite.

Perhaps pip install -e would be better (less rigid) than conda develop?

Either way, if you can serialize the return values produced by your common code, I would think you can farm it out to satellite and call it from anywhere.