简体   繁体   English

moduleNotFoundError:没有在 Visual Studio 代码中命名的模块

[英]moduleNotFoundError: No module named in visual studio code

I am new into python and I copied a folder from someone to try.我是 python 的新手,我从某人那里复制了一个文件夹来尝试。 I import a whole folder with subfolders into a workspace from visual studio code.我将带有子文件夹的整个文件夹从 Visual Studio 代码导入工作区。

the subfolder named algorithm has an init .py file which imports all the sub files(for example a file named calculation) In the main file I'm trying to run is: import algorithm as alg名为 algorithm 的子文件夹有一个init .py 文件,它导入所有子文件(例如名为计算的文件) 在我试图运行的主文件中是:import algorithm as alg

all functions are recognized inside visual studio code when using alg.使用 alg 时,所有函数都在 Visual Studio 代码中被识别。 but when I try to run it, it still saying that the module is not found?但是当我尝试运行它时,它仍然说找不到模块? error message错误信息

What did I forget?我忘记了什么? thanks in advance提前致谢

Algorithm is a module that need you to install manually.算法是一个需要你手动安装的模块。

Open an integrated Terminal and if you're using virtual environment, activating it then installing the module.打开一个集成终端,如果您使用的是虚拟环境,请激活它然后安装模块。 About how to activate environment, please view Python Environments .关于如何激活环境,请查看Python Environments Run pip install algorithm to install:运行pip install algorithm安装:

在此处输入图像描述

Then the import error should be resolved.然后应该解决导入错误。 If no module named algorithm still exists, run pip show algorithm to get its location and check if you've installed the module in current selected interpreter.如果仍然不存在no module named algorithm ,请运行pip show algorithm以获取其位置并检查您是否已在当前选择的解释器中安装了该模块。

暂无
暂无

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

相关问题 ModuleNotFoundError:Visual Studio Code 中没有名为“pandas”的模块 - ModuleNotFoundError: No module named 'pandas' in Visual Studio Code Visual Studio Code ModuleNotFoundError:没有名为“_overlapped”的模块 - Visual Studio Code ModuleNotFoundError: No module named '_overlapped' ModuleNotFoundError:Visual Studio Code 中没有名为“pyperclip”的模块 - ModuleNotFoundError: No module named 'pyperclip' in Visual Studio Code ModuleNotFoundError:Visual Studio Code 中没有名为“bs4”的模块 - ModuleNotFoundError: No module named 'bs4' just in Visual Studio Code ModuleNotFoundError:在 Visual Studio 代码中没有我的自定义类型名为“xxx”的模块 - ModuleNotFoundError: No module named 'xxx' with my custom type in Visual Studio code ModuleNotFoundError:使用 Visual Studio Code 在 Python 中没有名为“PySide6”的模块 - ModuleNotFoundError: No module named 'PySide6' in Python using Visual Studio Code ModuleNotFoundError:没有名为“selenium”的模块。 如何从 Visual Studio Code 修复它? - ModuleNotFoundError: No module named 'selenium'. How to fix it from Visual Studio Code? ModuleNotFoundError:Visual Studio 代码中没有名为“cx_Oracle”的模块 - ModuleNotFoundError: No module named 'cx_Oracle' in Visual Studio Code ModuleNotFoundError:没有名为“pandas”的模块(在 Visual Studio 中) - ModuleNotFoundError: No module named 'pandas' (in visual studio) ModuleNotFoundError:Visual Studio 代码中 azure function 上没有名为“azure.cosmos”的模块 - ModuleNotFoundError: No module named 'azure.cosmos' on azure function in visual studio code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM