0

I am new into python and I copied a folder from someone to try. I import a whole folder with subfolders into a workspace from visual studio code.

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

all functions are recognized inside visual studio code when using alg. 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

soepblikskes
  • 1
  • 1
  • 2

1 Answers1

0

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. Run pip install algorithm to install:

enter image description here

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.

Molly Wang-MSFT
  • 7,943
  • 2
  • 9
  • 22