Conda install broken?

Hello, I have just been met with the following error across all of my anaconda distributions across various platforms when upgrading conda and despite several clean installs all attempts to install matminer via “conda install -c conda-forge matminer” result in the following message

(main36) C:\Users\mm049>conda install -c conda-forge matminer
Collecting package metadata (current_repodata.json): done
Solving environment: 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: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package future conflicts for:
matminer -> future[version=’>=0.16.0’]
Package scikit-learn conflicts for:
matminer -> scikit-learn[version=’>=0.21.3’]
Package ujson conflicts for:
matminer -> ujson[version=’>=1.35’]
Package six conflicts for:
matminer -> six[version=’>=1.11.0’]
Package sqlite conflicts for:
python=3.6 -> sqlite[version=’>=3.25.3,<4.0a0|>=3.26.0,<4.0a0|>=3.29.0,<4.0a0’]
Package vc conflicts for:
python=3.6 -> vc[version=‘14.*|>=14,<15.0a0|>=14.1,<15.0a0’]
Package pymongo conflicts for:
matminer -> pymongo[version=’>=3.6.1’]
Package aflow conflicts for:
matminer -> aflow[version=’>=0.0.9’]
Package pint conflicts for:
matminer -> pint[version=’>=0.8.1’]
Package monty conflicts for:
matminer -> monty[version=’>=3.0.1’]
Package citrination-client conflicts for:
matminer -> citrination-client[version=’>=4.0.1’]
Package dscribe conflicts for:
matminer -> dscribe[version=’>=0.2.9’]
Package httplib2 conflicts for:
matminer -> httplib2[version=’>=0.10.3’]
Package ase conflicts for:
matminer -> ase[version=’>=3.14.1’]
Package sympy conflicts for:
matminer -> sympy[version=’>=1.1.1’]
Package numpy conflicts for:
matminer -> numpy[version=’>=1.17.2’]
Package jmespath conflicts for:
matminer -> jmespath[version=’>=0.9.3’]
Package pip conflicts for:
python=3.6 -> pip
Package pymatgen conflicts for:
matminer -> pymatgen[version=’>=2019.10.2’]
Package tqdm conflicts for:
matminer -> tqdm[version=’>=4.23.1’]
Package vs2015_runtime conflicts for:
python=3.6 -> vs2015_runtime
Package mdf_forge conflicts for:
matminer -> mdf_forge[version=’>=0.6.1’]
Package requests conflicts for:
matminer -> requests[version=’>=2.20.0’]
Package pandas conflicts for:
matminer -> pandas[version=’>=0.23.4’]
Package plotly conflicts for:
matminer -> plotly[version=’>=3.2.1’]

Is there a problem with the repository or is there a problem on my end?

Kind Regards

Michael Moran

I haven’t seen this error before, but suspect that it could be an issue with your conda environments.

Could you try creating a fresh Python 3.7 environment (e.g., conda create --name matminer python==3.7.*) and then install matminer in that new environment?

That will help us figure out if the problem is particular to your environment.

Hey Michael, did you resolve your issue or is the conda install still broken for you?

Thanks,
Alex

Hi Ardunn, in the end I had to completly remove conda and then do a few force updates through apt before reinstalling it.

It’s fine now, probably an issue with my OS.

1 Like

Hi I’ve had the issue again on another environment and have tried to resinstall anaconda from scratch and tried python 3.6 and 3.7 virtual envs to no avail, error is identical.

Hey MIchael,

Thanks for the update. This issue has been added to the github repo and we will work on fixing it. We’ll udpate this thread when things are fixed!

Thanks,
Alex

Has there been any progress made on this? The conda install is still broken for me (via the conda-forge channel on Windows 10). My error is identical to Michael’s, where conda is struggling to solve the environment. This is also will an empty venv too.

-Jack

Looks like a forced pip-install fails too. It can’t build pymatgen & spglib, so maybe that’s a good place to start with the fix. I know pymatgen also lists spglib as a dependency - perhaps their listed version conflicts with yours…?

Going through the requirements.txt of matminer + pymatgen’s githubs, the only conflict is between plotly versions (v3.2.1 for matminer and v4.5.0 for pymatgen).

I’m kinda just guessing here, but any help would be appreciated!

-Jack

Last update - I promise! This issue looks to be localized to Windows 10 for me. When I switch to Ubuntu, the conda install works fine.

Hey there,

We haven’t gotten around to testing and fixing this yet. Could you output the error message and commands you entered?

Thanks,
Alex

Sure thing! Here’s a summary of what I’ve tested so far:

Example 1

This is the ideal method that doesn’t work. I run these following commands on Windows 10 via the anaconda prompt:

conda create -n test_env python=3.7;
conda activate test_env;
conda install -n test_env -c conda-forge matminer;

This fails to install as it cannot solve the conda environment (see Michael’s output above)

Example 2

This is the “forced” pip install method - which is a last resort for installing things with conda enviornments. I run these following commands on Windows 10 via the anaconda prompt:

conda create -n test_env python=3.7;
conda activate test_env;
pip install matminer;

This fails and the error output is pretty massive. I’ll try to grab the key parts:

Building wheel for pymatgen (setup.py) ... error
ERROR: Command errored out with exit status 1:
...
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for pymatgen
...
Running setup.py clean for pymatgen
  Building wheel for spglib (PEP 517) ... error
  ERROR: Failed building wheel for spglib
...
Failed to build pymatgen spglib
ERROR: Could not build wheels for spglib which use PEP 517 and cannot be installed directly

Example 3

This is (again) the ideal method that doesn’t work. I run these following commands on Ubuntu 19.10 via the terminal:

conda create -n test_env python=3.7;
conda activate test_env;
conda install -n test_env -c conda-forge matminer;

This actually successfully works on Ubuntu, but matminer throws massive failures when you actually try to run it. That error in python is “Illegal instruction (core dumped)”, which I was unable to figure out.

Example 4 (working!)

This how I have matminer currently working, but it’s very non-ideal for beginner python users. I do this on Windows 10 via the anaconda prompt:

conda create -n test_env python=3.7;
conda activate test_env;
conda install -n test_env -c conda-forge pymatgen scikit-learn plotly tqdm

This installs all of matminers dependencies (I think - at least for all the functions I’ve used so far). I then clone the matminer repository to my desktop and add the matminer folder to my python path. So far, everything I’ve done using the package has worked so far. I bet the one thing that will throw issues is when using the plotly package, but I haven’t used any of that functionality with matminer yet.

I hope this helps!

-Jack

Hey Jack,

We have updated the repo but have yet to release a new version. could you try downloading from github and installing with

git clone https://github.com/hackingmaterials/matminer
cd matminer
pip install -e .

From within your virtualenv/condaenv?

Thanks,
Alex

I gave this a go, but it unfortunately gave the same error as before (Example 2) – this may be on my end though. Even when I make a brand new condaenv, I run the pip install and it’s saying pip is using cached downloads of some of the programs. I might have to completely uninstall/reinstall anaconda, which I won’t be able to do this week (I am giving final exams and don’t want to mess with one of my condaenv until after). Sorry!! I can possibly give this another attempt late in the week if you’d like. Let me know.

-Jack

Hi Jack,

I’m interested to see if using a non-cached version of matminer fixes the issue. Once you get the chance you can try disabling the cache with:

pip install matminer --no-cache-dir

Thanks for testing this for us.

Best,
Alex

Hey Alex,

I have done as your methode, but it remain to fail to building wheel for spglib and pymatgen

~Jem

Hey @xsm

Can you provide more details about the system you are running on? You may have to compile spglib by itself. I am not sure this is a matminer problem specifically, but rather a spglib problem inside pymatgen. To test this, if you try installing pymatgen by itself, does that work (e.g., pip install pymatgen or conda install pymatgen

You may have luck also asking on the pymaten part of the forum, where the pymatgen experts reside: https://matsci.org/c/pymatgen/9