B A C H A S H
B A C H A S H

Reputation: 126

how to solve error ModuleNotFoundError on virtual env subdirectory?

As seen in the image below, I finished working on my project folder "click" under the main folder "my project." I didn't establish a virtual environment when I first started working on the project, but after I finished it, I did so and imported all of the packages that the files in the "click" folder required (and deleted all packages in the global environment).

The issue is that when I execute any project file in the "click" folder, I receive an error message that says "ModuleNotFoundError: No module named'module name'." The packages I installed when I built the virtual environment folder "my project" appear to be invisible to the subdirectory.

Can someone tell me what I need to do in order to solve this problem?

enter image description here

Upvotes: 0

Views: 267

Answers (1)

Yasin Tatar
Yasin Tatar

Reputation: 33

Have you activated the Virtual Environment?

Navigate to the top-folder of your directory and run run

.\venv\Scripts\activate

(assuming you used virtualenv).

After this, all local packages should become available.

Upvotes: 1

Related Questions