conda-forge: Why does Conda inconsistently want to downgrade NumPy?
share conda environment
conda-forge vs conda
python change environment
python list environments
I'm trying to prefer packages from CondaForge (for availability and compatibility). However, Conda seems to want to prefer versions of core libraries (e.g. NumPy) from other channels.
For example, when I try to install a new library, Conda offers to downgrade NumPy, but if I ask for the same library and NumPy, Conda no longer advises downgrade. Why?
$ conda install -c conda-forge beautifulsoup4 The following NEW packages will be INSTALLED: beautifulsoup4: 4.6.3-py36_0 conda-forge The following packages will be UPDATED: numpy-base: 1.14.3-py36h0ea5e3f_1 --> 1.15.0-py36h3dfced4_0 The following packages will be DOWNGRADED: blas: 1.1-openblas conda-forge --> 1.0-mkl numpy: 1.15.1-py36_blas_openblashd3ea46f_1 conda-forge [blas_openblas] --> 1.15.0-py36h1b885b7_0 scikit-learn: 0.19.2-py36_blas_openblasha84fab4_201 conda-forge [blas_openblas] --> 0.19.1-py36hedc7406_0 scipy: 1.1.0-py36_blas_openblash7943236_201 conda-forge [blas_openblas] --> 1.1.0-py36hc49cb51_0 Proceed ([y]/n)? n $ conda install -c conda-forge beautifulsoup4 numpy The following NEW packages will be INSTALLED: beautifulsoup4: 4.6.3-py36_0 conda-forge Proceed ([y]/n)? y
Is there a preference that will give better behaviour?
Downgrading numpy from defaults -> conda-forge results in broken , Issue: If one installs numpy=1.16.x from defaults, and then downgrades to numpy=1.15.4 from conda-forge, numpy-base is not removed, Any explanation what the solver is doing here? conda create -n test35 python=3.5 anaconda=4.1 conda install -n test35 matplotlib=1.5.2. The following NEW packages will be INSTALLED: mkl-rt: 11.1-p0 defaults The following packages will be UPDATED: anaconda: 4.1.1-np111py35_0 defaults --> custom-py35_0 defaults freetype: 2.5.5-1 defaults --> 2.6.3-1 conda-forge h5py: 2.6.0-np111py35_1 defaults
This doesn't really explain why it was happening, but a fix is:
$ conda config --add pinned_packages conda-forge::numpy
The environment is inconsistent, please check the package plan , Dear friends, I had installed the antismash by conda with "conda install -c bioconda antismash ". But it was interrupted defaults/win-64::numpy-base==1.15.4=py37h8128ebf_0 Note some packages were downgraded. It looked like it was a few packages from conda-forge that were causing the issue. I can only make a guess (because I don't have time to do a search on anaconda.org), but my guess would be that there is no scikit-bio v0.5.1 built for Numpy 1.12, so to update Pandas it is necessary to update Numpy (from 1.11.3 to 1.12.1) which has the knock on effect of downgrading scikit-bio.
You can read the conda-forge documentation http://conda-forge.org/docs/user/tipsandtricks.html#multiple-channels
To see your channels and priorities
$conda config --describe channel_priority
The solution is to add the
conda-forge channel on top of defaults in your
.condarc file when using
conda-forge packages and activate the strict channel priority with:
$ conda config --set channel_priority strict
Here is how a
.condarc file would look like:
$ cat .condarc
In addition to the channel priority we recommend to always install your packages inside a new environment instead the root environment from anaconda/miniconda. Using envs make it easier to debug problems with packages and ensure the stability of your root env.
conda install numba wants to downgrade numpy, Ask questionsconda install numba wants to downgrade numpy following NEW packages will be INSTALLED: llvmlite: 0.27.1-py37hdbcaa40_0 conda-forge The problem is that conda really wants to get rid of the "feature" that is attached to that conda-forge package. Implicit dependencies behave differently from explicit ones. When you explicitly specify it, I believe the channel priority wins.
[PDF] conda Documentation, To specify which variant of NumPy that you want, you could Conda-forge is a community channel made up of thousands of Downgrading conda from 4.6.1 to 4.5.x and then trying to conda Improve solver behavior in the presence of inconsistent environments (such as pip as a conda dependency of. conda config --env --add pinned_packages conda-forge::numpy conda config --env --add pinned_packages conda-forge::opencv conda config --env --add pinned_packages conda-forge::gdal The advantage of doing this by environment is obviously, that I can have different channel priorities for different environments; a highly under-advertised feature of
stop conda from modifying unrelated packages, For example, just now I wanted to downgrade numpy in my MB The following packages will be UPDATED: openssl: 1.0.2o-0 conda-forge Hi, I just installed carroty using condo. When doing so, condo forces me to actually DOWNgrade some of the dependencies as follows: The following packages will be DOWNGRADED due to dependency conflicts: matplotlib: 2.0.0-np111py27_0 -->
Drawing a line to the scope of Python packaging, However, conda-forge could create a Python-installer that had One thing that I (as a pip user) would like, is a way to use packages that (for other packages like numpy, to replace them with conda-managed versions). Once an environment is inconsistent, things start getting really strange and broken. That is why we have been adding new features to the next version of conda to simplify this process. While still in beta, conda 4.6.0 allows conda to consider pip installed packages and either replace these packages as needed or fulfill dependencies with the existing package.
- I've also seen similar behaviour (conda 4.6.7 and not involving numpy) where
conda install basemap-data-hiresproposed extensive updates and downgrades (probably related to superseding gdal with a lower version in a higher-priority channel) whereas
conda install basemap-data-hires gdalonly installed basemap-data-hires (same version/build/channel both times).
- It looks like you installed numpy 1.14.3 from the Anaconda defaults channel, which installed numpy-base (one of the outputs from the numpy package). Then you somehow installed numpy itself (1.15.1) from conda-forge. conda may be looking at this and deciding to update numpy-base to the new version from the defaults channel, and along with that, installing numpy from the defaults channel. So this may just be the result of some inconsistent install/remove activities. If you create a new environment and use
conda config --add channels conda-forge, things should go smoothly from there.
- I think there could be a typo in this?: "While scanning SciPy's dependencies it will notice that there is a newer version of numpy available on defaults. Thinking it is being helpful, conda will install the newer version of numpy from conda-forge even though you already had it installed from conda-forge."
- Thanks! I really would like to know why this happens. It's very frustrating, particularly since conda want to downgrade numpy when you install a package that has nothing to do with numpy...