简体   繁体   English

python - 通过 pip 和 conda 安装后无法使用 gmsh

[英]python - Can't use gmsh after installing via pip and conda

I installed gmsh but I can not use it in spyder.我安装了 gmsh 但我不能在 spyder 中使用它。 I used the following:我使用了以下内容:

pip install gmsh
conda install -c conda-forge gmsh

but when I run the following code:但是当我运行以下代码时:

import gmsh
gmsh.initialize()

I get the following error:我收到以下错误:

No module named 'gmsh'

I'm using ubuntu 20.04 and spyder 3.3.6我正在使用 ubuntu 20.04 和 spyder 3.3.6

The gmsh package in conda-forge don't provide the Python API. gmsh conda-forge forge 中的 gmsh package 不提供 Python API。 Please install gmsh using pip install gmsh .请使用pip install gmsh If you still prefer to use conda, you can download the python-gmsh package from the conda-forge channel using conda install -c conda-forge gmsh python-gmsh .如果您仍然喜欢使用 conda,可以使用conda install -c conda-forge gmsh python-gmsh forge gmsh python-gmsh 从 conda conda-forge forge 频道下载python-gmsh gmsh package。 Here you will find the Python API you're looking for.在这里您会找到您正在寻找的 Python API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM