简体   繁体   English

在虚拟环境 python 中安装 gmsh 模块

[英]Installing gmsh module in virtual enviroment python

I am using a virtual environment for my python code.我正在为我的 python 代码使用虚拟环境。 I installed the gmsh module inside the folder project\venv\lib\site-packages, and apparently, it is done properly since when I create the "requirement.txt" it appears within the required modules.我在文件夹 project\venv\lib\site-packages 中安装了 gmsh 模块,显然,它已正确完成,因为当我创建“requirement.txt”时,它出现在所需的模块中。 However, when I open the project folder in Visual Studio Code, and I try to import the gmsh module, it is not found.但是,当我在 Visual Studio Code 中打开项目文件夹并尝试导入 gmsh 模块时,找不到它。

Can you give me some hints??你能给我一些提示吗??

-- Edit installation vs code -- 编辑安装vs 代码

As this answer suggest, you need to set your Python interpreter in VS Code.正如这个答案所暗示的,您需要在 VS Code 中设置您的 Python 解释器。

You should select project\venv\bin\python as your interpreter你应该 select project\venv\bin\python作为你的解释器

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

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