【问题标题】:Google Colab shows error while installing pymatgenGoogle Colab 在安装 pymatgen 时显示错误
【发布时间】:2021-05-18 02:43:53
【问题描述】:

我正在尝试通过以下命令在 Google colab 中安装 pymatgen:

!pip install pymatgen

这会引发以下错误:

    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.
  

尝试使用以下方式安装:

!pip install -vvv pymatgen

这会引发以下错误:

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.

请帮助解决这个问题。

【问题讨论】:

    标签: python installation pip google-colaboratory pymatgen


    【解决方案1】:

    Google colab 做了一个补丁,之后自然安装 pymatgen 就不起作用了。所以你需要安装带有版本规范的pymatgen。在我的例子中,我正在使用这个命令,并且它运行良好,直到今天。

    !pip install pymatgen==2020.11.11
    

    祝你有美好的一天!

    【讨论】:

      【解决方案2】:

      尝试以下方法:

      !pip3 install pymatgen
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-08-09
        • 2023-01-07
        • 2021-08-29
        • 2022-11-13
        • 1970-01-01
        • 2018-07-03
        • 1970-01-01
        • 2020-02-20
        相关资源
        最近更新 更多