[Python] How to put python in a virtual environment? [duplicate]

Discussão em 'Python' iniciado por Stack, Março 31, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to creat a projet P that uses python (to execute code cuntaind in a 'code' fill) and does not require the user to separatly install python. How can I creat a virtual environment V contaning the dependencies (python 3.x's pythonw.exe and library L). There would be a batch file init.bat too. I would like to keep the codes in the 'code' file readable and editable as python code, is it possible with Pyinstaller or any other solution or not?

    Project structure :

    P
    ├init.bat
    ├code
    |¦
    |└….py
    └V
    ├python 3.x
    └L


    Could you please explain me how to do this, feel free to patially respond depending on your time/knolege/envie. Excuse me for my bad english and any errors and/or unclaritys.

    Continue reading...

Compartilhe esta Página