[Python] Why does python -m venv venv create a pyenv.cfg file?

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

  1. Stack

    Stack Membro Participativo

    I had pyenv for a while but I deleted it. I installed a newer version of python (3.9.13) and when I create a virtual environment with it, I see a pyenv.cfg getting created:

    $ python --version
    Python 3.9.13
    $ python -m venv venv
    $ ls -l venv
    total 8
    drwxr-xr-x 12 codeforester staff 384 May 9 22:26 bin
    drwxr-xr-x 2 codeforester staff 64 May 9 22:26 include
    drwxr-xr-x 3 codeforester staff 96 May 9 22:26 lib
    -rw-r--r-- 1 codeforester staff 76 May 9 22:26 pyvenv.cfg
    $ cat pyvenv.cfg
    home = /usr/local/bin
    include-system-site-packages = false
    version = 3.9.13


    Why is this file getting created? How can stop this from happening?

    Continue reading...

Compartilhe esta Página