[Python] Python doesn't find modules in subfolder when launch with .bat file and conda...

Discussão em 'Python' iniciado por Stack, Maio 14, 2025.

  1. Stack

    Stack Membro Participativo

    I want to launch my python script with a .bat file. It uses some 'lib' in a conda environment, (like PyQt5), but, when I launch it, it finds 'lib' in the conda environment, but not the 'method' in another subfolder.

    My python file is bl\ui\main.py and uses method in bl\user\user.py

    How can I correct it?

    My .bat file:

    @echo off

    set CONDA_PATH=C:\Users\miniconda

    call %CONDA_PATH%\Scripts\activate.bat
    call conda activate prod

    python C:\Users\bl\ui\main.py

    pause

    Continue reading...

Compartilhe esta Página