DEV Community

Alex Minutillo
Alex Minutillo

Posted on

WSL Docker Requirements.txt Error

While setting up Apache Airflow using Docker on Windows 11 WSL, I needed to extend the image to install some python packages. I created a dockerfile and requirements.txt, but every time I ran "docker-compose up --build", I received the error:

ERROR: Invalid requirement: '<package-name': Expected semicolon (after name with no version specifier) or end

To fix the error, I needed to change the encoding of the requirements.txt file in Windows from "UTF-8" to "ANSI".

Sharing in case anyone experiences this error.

Top comments (0)