1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] pip install -r requirements.txt is not working in venv

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    i have this weird problem with python venvs. If i activate the venv and try to install packages via pip install -r requirements.txt the packages are getting installed to the global python and not in the venv.

    i am using python 3.11.2 on Debian Bookworm.

    I've googled now 2 hours and tried everything including everything in pip installing in global site-packages instead of virtualenv and nothing helped. The path are correctly set,which pip gives me the path to the venv pip, there are no aliases, i created configfiles but nothing helped.

    Then i tried to install a package without the -r requirements.txt e.g. pip install numpy that worked and the packages were installed inside the venv. So what's the problem of pip not installing packages with the -r parameter to the venv?

    Continue reading...

Compartilhe esta Página