在Colab中安装MeshPy

时间:2019-02-26 09:46:20

标签: python pip install

我尝试使用!pip install MeshPy在Colab中安装MeshPy,但得到以下输出,但尚未安装该软件包。我将不胜感激任何建议。 这是完整的输出

Collecting MeshPy

  Downloading 

https://files.pythonhosted.org/packages/90/03/3bb205ac46141074aeb561f5bbf60fb2214380aa6ac1435b49d275cf219a/MeshPy-2018.2.1.tar.gz (472kB)
    100% |████████████████████████████████| 481kB 25.8MB/s 

Collecting pytools>=2011.2 (from MeshPy)

  Downloading 

https://files.pythonhosted.org/packages/ac/a3/f54f7190315ad41b7334d8733350e7fcefded8f25e0b45e2329b80279921/pytools-2019.1.tar.gz (57kB)
    100% |████████████████████████████████| 61kB 22.3MB/s 

Requirement already satisfied: pytest>=2 in /usr/local/lib/python3.6/dist-packages (from MeshPy) (3.10.1)

Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from MeshPy) (1.14.6)

Collecting gmsh_interop (from MeshPy)
  Downloading 

https://files.pythonhosted.org/packages/a5/8c/62c40850d8e8a2c9c3d223c9b9456ed4431f02b0c45e16cc90bf0025fffe/gmsh_interop-2019.1.tar.gz

Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from MeshPy) (1.11.0)

Requirement already satisfied: decorator>=3.2.0 in /usr/local/lib/python3.6/dist-packages (from pytools>=2011.2->MeshPy) (4.3.2)

Collecting appdirs>=1.4.0 (from pytools>=2011.2->MeshPy)

  Downloading 

https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl

Requirement already satisfied: atomicwrites>=1.0 in /usr/local/lib/python3.6/dist-packages (from pytest>=2->MeshPy) (1.3.0)

Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from pytest>=2->MeshPy) (40.8.0)

Requirement already satisfied: py>=1.5.0 in /usr/local/lib/python3.6/dist-packages (from pytest>=2->MeshPy) (1.8.0)

Requirement already satisfied: pluggy>=0.7 in /usr/local/lib/python3.6/dist-packages (from pytest>=2->MeshPy) (0.9.0)

Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.6/dist-packages (from pytest>=2->MeshPy) (18.2.0)

Requirement already satisfied: more-itertools>=4.0.0 in /usr/local/lib/python3.6/dist-packages (from pytest>=2->MeshPy) (6.0.0)

Building wheels for collected packages: MeshPy, pytools, gmsh-interop

  Building wheel for MeshPy (setup.py) ... error

  Failed building wheel for MeshPy

  Running setup.py clean for MeshPy

  Building wheel for pytools (setup.py) ... done

  Stored in directory: /root/.cache/pip/wheels/1b/f4/26/46b6cf949b3cccefcc41e6b526f7c16351a4a5c124fc6f6eaa

  Building wheel for gmsh-interop (setup.py) ... done

  Stored in directory: /root/.cache/pip/wheels/be/19/0b/76011e06f64c41e0dcfed58e171c091c31f2b499a981d8d773

Successfully built pytools gmsh-interop

Failed to build MeshPy

Installing collected packages: appdirs, pytools, gmsh-interop, MeshPy

  Running setup.py install for MeshPy ... error

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-matqpp2p/MeshPy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-8_339liz/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-matqpp2p/MeshPy/

1 个答案:

答案 0 :(得分:0)

错误信息不足。要查看确切原因,我们需要更长的追溯时间。

让我猜。我尝试使用pip install MeshPy自己安装MeshPy,但收到有关缺少pybind11的错误。所以我跑了

pip install pybind11
pip install MeshPy

并成功安装了MeshPy。