Menu

Post image 1
Post image 2
1 / 2
0

WSL Docker Requirements.txt Error

DEV Community·Alex Minutillo·29 days ago
#2EI8K9OQ
#docker#windows#python#airflow#error#needed
Reading 0:00
15s threshold

Alex Minutillo

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.

Read More