Detecting python modules from different directories in my project structure

30 Views Asked by At

I have a project structure in VSCode like this:

Project/
  .venv/
    virtual environment containing pip packages like numpy
  config/
    __init__.py
    useful scripts
  src/
    program.py

I want program.py to be able to import packages from the virtual environment as well as the config package I made.

The issue is that it's not detecting the "config" module. I'm afraid that if I do something like append the system path, it will just make the virtual environment modules undetected instead. Do I have to change my project structure or is there an easier way?

0

There are 0 best solutions below