Google Colab shows error while installing pymatgen

797 Views Asked by At

I'm trying to install pymatgen in Google colab via the following command:

!pip install pymatgen

This throws the following error:

    Collecting pymatgen
    Using cached https://files.pythonhosted.org/packages/06/4f/9dc98ea1309012eafe518e32e91d2a55686341f3f4c1cdc19f1f64cb33d0/pymatgen-2021.2.14.tar.gz

  Installing build dependencies ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9j4h3p2n/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'numpy>=1.20.1' 'setuptools>=43.0.0' Check the logs for full command output.
  

Trying to install with following:

!pip install -vvv pymatgen

This throws the following error:

pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-g1m0e202/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'numpy>=1.20.1' 'setuptools>=43.0.0' Check the logs for full command output.

Please help solve this issue.

2

There are 2 best solutions below

0
On

Google colab made a patch and after that, natural installation of pymatgen doesn't work. so you need to install pymatgen with specification for version. In my case, I am using this command, and it is well working until today.

!pip install pymatgen==2020.11.11

have a nice day!

0
On

Try the following:

!pip3 install pymatgen