[Python] Using whitespace within a file requirements.txt

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

  1. Stack

    Stack Membro Participativo

    In one manual I saw a similar installation pip install torch torchvision which has a space between the last two words. But I can't use this in requirements.txt

    If I have the contents of the requirements.txt file:

    torch torchvision
    opencv-python
    Tables


    Then when pip install -r requirements.txt is called, it causes an error: ERROR: Invalid requirement: 'torch torchvision' (from line 1 of requirements.txt)

    I assume there is a different kind of torch torchvision entry

    Continue reading...

Compartilhe esta Página