简体   繁体   English

“ModuleNotFoundError:即使安装了模块,也没有名为‘...’的模块

[英]"ModuleNotFoundError: No module named '…' even though module is installed

Trying to import "libgen_api" module but get "Module not found" error.尝试导入“libgen_api”模块但得到"Module not found"错误。

Pip install libgen-api shows "requirement already satisfied" and the module exists in the python folder as well. Pip install libgen-api显示"requirement already satisfied"并且该模块也存在于 python 文件夹中。

The documentation of the module says that it has to be called with libgen_api .该模块的文档说它必须用libgen_api

Other modules work fine.其他模块工作正常。 I am using VScode but the problem persists in the python terminal as well.我正在使用 VScode,但问题仍然存在于 python 终端中。 I apologize if this question is redundant but so far I have not been able to find a solution anywhere.如果这个问题是多余的,我深表歉意,但到目前为止,我无法在任何地方找到解决方案。

The problem was that VScode sys.path showed python38-32 but the module was installed in python39 .问题是 VScode sys.path显示python38-32但模块安装在python39中。 To fix the issue go to View -> Command pallete -> select interpreter and make sure to use the version under which pip installed the module.要将问题 go 修复到View -> Command pallete -> select interpreter ,并确保使用 pip 安装模块的版本。

This answered my question.这回答了我的问题。 How can I change python version in Visual Studio Code? 如何在 Visual Studio Code 中更改 python 版本?

暂无
暂无

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

相关问题 ModuleNotFoundError:即使已安装,也没有名为“pycountry”的模块 - ModuleNotFoundError: No module named 'pycountry' even though it is installed ModuleNotFoundError:即使我安装了功能工具,也没有名为“功能工具”的模块 - ModuleNotFoundError: No module named 'featuretools' even though I have installed featuretools ModuleNotFoundError:没有名为“google.cloud”的模块,即使我安装了它 - ModuleNotFoundError: No module named 'google.cloud' even though I installed it ModuleNotFoundError:即使安装了包,也没有名为“matplotlib”的模块 - ModuleNotFoundError: No module named 'matplotlib' even though the package is installed ModuleNotFoundError:没有名为“googlemaps”的模块 - 尽管安装了 googlemaps - ModuleNotFoundError: No module named 'googlemaps' - though googlemaps installed ModuleNotFoundError,即使模块已成功安装 - ModuleNotFoundError, even though module is successfully installed 没有名为“setuptools”的模块,即使该模块已安装 - No module named 'setuptools', even though the module is installed ModuleNotFoundError:即使安装后也没有名为“selenium”的模块 - ModuleNotFoundError: No module named 'selenium' even after installed ModuleNotFoundError:即使模块存在,也没有名为“ requests”的模块 - ModuleNotFoundError: No module named 'requests' even though module exists ModuleNotFoundError:即使安装了 django-heroku,也没有名为“django_heroku”的模块 - ModuleNotFoundError: No module named 'django_heroku' even though django-heroku is installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM