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

Hello @ardunn & @alex

i read this entire thread with interest and i’m having the exact same issues as jacksund is. i have tried everything jacksund has tried, with the exact same error messages and failures.
i am interested in further suggestions for fixes if you have them.
i am running on a Windows 10 system as well.

Thank you!

hello @ardunn & @alex,

i have tried the following steps to build pymatgen, with some success, but my matminer install still fails.

i did the following steps in order:

  1. conda create -n genericml_cond455_env python=3.6 conda=4.5.5”
  2. conda activate genericml_cond455_env
  3. conda install numpy==1.16.4
  4. conda install pandas==0.24.2
  5. conda install scikit-learn==0.21.2
  6. conda install matplotlib==3.1.0
  7. conda install -c atztogo spglib
  8. conda install pymatgen==2019.6.5

up till this point it works. i suspect that the problems with spglib builds are that the metadata specifies to wrong channel for spglib. we are told that spglib is in -c materials or -c matsci, but it’s really in -c atztogo (the author’s personal channel)

these steps successfully install spglib and pymatgen,

however the last step i need is matminer, and this is where “conda install matminer” fails. the error message i get is:

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

Output in format: Requested package -> Available versions"

which is very unspecific because it does not specify which packages are in fact conflicting.

following the discussion on the conflicting versions of plotly (v3.2.1 for matminer and v4.15.0 for pymatgen) stated by jacksund, i checked the plotly version that got successfully installed for me with pymatgen is 4.14.0.

is there a workaround to install both versions of plotly so that pymatgen and matminer each have their own plotly to be satisfied?

any advice would be appreciated! thanks!

–Bonita

Use conda-forge for pymatgen/spglib:
conda install -c conda-forge pymatgen

That will bring down most of the necessary requirements as well. Then install matminer via pip:
pip install matminer

2 Likes

Hello,

I am new to Pymatgen, I am trying to install it via Conda on my laptop. I am using a macOS system, the python version in anaconda is 3.8.10, I followed the steps in the website by making a new (empty) virtual environment, I pip installed numpy and pymatgen (I tried both ways mentioned in the website via conda forge and pip, separately in a clean new environment), I am still getting this error after running: print(pymatgen.version)

Error: module ‘pymatgen’ has no attribute ‘version

I have tried some other commands with conda matsci as well in new venvs, but none of them works, the package is installed but it does not work. I would really appreciate your help on this. Thank you :wink:

PS. I have no file or folder called pymatgen that can explain that maybe the system is confused about importing the module!