Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Start does not work as written on Ubuntu 24.04 #46316

Open
1 of 2 tasks
mpol opened this issue Jan 31, 2025 · 6 comments
Open
1 of 2 tasks

Quick Start does not work as written on Ubuntu 24.04 #46316

mpol opened this issue Jan 31, 2025 · 6 comments
Assignees

Comments

@mpol
Copy link

mpol commented Jan 31, 2025

What do you see as an issue?

When following https://airflow.apache.org/docs/apache-airflow/stable/start.html on an Ubuntu 24.04 system the pip install step fails with error: externally-managed-environment.

I would expect it to fail in the same way on a Debian Bookworm system and probably on other current distribution versions.

Solving the problem

The Debian/Ubuntu error message gives good hints how to solve the problem, but I think that a quickstart document should provide steps that work out of the box. So they should involve creating a venv, or at least, if you assume users to have some required level Python knowledge, the document should warn the user that this step may be needed.

Anything else

The full error text:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@mpol mpol added kind:bug This is a clearly a bug kind:documentation needs-triage label for new issues that we didn't triage yet labels Jan 31, 2025
Copy link

boring-cyborg bot commented Jan 31, 2025

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@potiuk
Copy link
Member

potiuk commented Jan 31, 2025

That is a feature of new pip relased recently. If you would like to submit a PR correcting the documentation fixing it you are most welcome (It's just a matter of clicking "suggest a change on this page" and PR will be opened for you and you can join > 3200 contributors to Airlfow and give back to the community by contributing such doc update. Other than that I mark it as "good first issue" so maybe someone will pick it up and fix. But I encourage you to make a PR.

@potiuk potiuk added good first issue and removed needs-triage label for new issues that we didn't triage yet labels Jan 31, 2025
SaumilPatel03 added a commit to SaumilPatel03/airflow that referenced this issue Jan 31, 2025
fantom845 added a commit to fantom845/airflow that referenced this issue Jan 31, 2025
added extra step for ubuntu/debian users 
issue: apache#46316
@adan-shahid
Copy link

adan-shahid commented Feb 1, 2025

@potiuk Is this issue open? If yes then kindly assign it to me and guide me to start it.
Thanks!

@potiuk
Copy link
Member

potiuk commented Feb 1, 2025

Feel free.

@Maryam3107
Copy link

Maryam3107 commented Feb 2, 2025

What do you see as an issue?

When following https://airflow.apache.org/docs/apache-airflow/stable/start.html on an Ubuntu 24.04 system the pip install step fails with error: externally-managed-environment.

I would expect it to fail in the same way on a Debian Bookworm system and probably on other current distribution versions.

Solving the problem

The Debian/Ubuntu error message gives good hints how to solve the problem, but I think that a quickstart document should provide steps that work out of the box. So they should involve creating a venv, or at least, if you assume users to have some required level Python knowledge, the document should warn the user that this step may be needed.

Anything else

The full error text:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

I can solve this issue. kindly assign it to me?

@adan-shahid
Copy link

adan-shahid commented Feb 2, 2025

I am already working on this issue.
@Maryam3107 kindly look for another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants