ERROR: Directory ‘\\’ is not installable. Neither ‘setup.py’ nor ‘pyproject.toml’ found. when trying to install Airflow

I’ve been trying to install airflow following their guide, I already set up te environment but when I try to install it this error appears: “ERROR: Directory ‘\’ is not installable. Neither ‘setup.py’ nor ‘pyproject.toml’ found.”.

I used the following command:

py -m pip install 'apache-airflow==2.8.1' \ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.11.txt" 

  • 3

    I think it is caused by the backslash after 'apache-airflow==2.8.1'. Why do you have that?

    – 




  • What guide? Do you have a link to it? Was the command written as two rows and the backslash was at the end of the first row? In that case it was to indicate that the two rows should be interpreted as one, and can safely be removed if entered on a single line.

    – 

Assuming you ment the instructions at https://github.com/apache/airflow, where it is written as

pip install 'apache-airflow==2.8.1' \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.8.txt"

In unix-like environments, backslash is used to break up a long line into multiple lines, and the shell assembles it into one line before executing

If the command is written on one line, the backslash must be removed, otherwise you will get strange error messages.

You have not indicated in your question which operating system you are using, or a link to the instructions you are following. It is information that would have made it easier to answer your question.

Leave a Comment