Can't install airflow using pip

I am using the default python2.7 version 2.7.12 in Ubuntu 16.04. /usr/bin/python link target is python2.7 and the location is /usr/bin/. I am trying to install airflow using pip using the following command:

sudo pip install airflow

But I keep getting the same error at the end of the installation:

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_299UT/setproctitle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mPuPkN-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_299UT/setproctitle/

...and the installation fails

2 Answers

The problem was here:

unable to execute 'x86_64-linux-gnu-gcc': No such file or directory

I have solved it using the following commands I found in other answers:

sudo apt-get update --fix-missing

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev

sudo pip install airflow

airflow has a lot of dependencies. Installing airflow also installs the following packages:

sqlalchemy, Mako, python-editor, alembic, croniter, dill, itsdangerous, click, Werkzeug, jinja2, flask, wtforms, flask-admin, flask-cache, flask-login, PyYAML, flask-swagger, flask-wtf, ordereddict, funcsigs, future, smmap2, gitdb2, gitpython, gunicorn, lxml, markdown, psutil, lockfile, docutils, python-daemon, Unidecode, python-slugify, python-nvd3, setproctitle, tabulate, thrift, zope.deprecation

In order to make sure that all these packages are installed correctly, update pip to the latest version (currently pip 9.0.1) before running sudo pip install airflow:

sudo -H pip2 install --upgrade pip 

failed with error code 1 in /tmp/pip-build-_299UT/setproctitle/ error could be caused by a missing package that isn't installed. Install some setuptools packages.

sudo apt install python-setuptools python-setuptools-git python-pbr 

I'm not sure about needing to install python-setuptools-git and python-pbr (especially python-setuptools-git) because they aren't installed in my Ubuntu and somehow pip install airflow is working anyway, so try installing just python-setuptools first.

You can also save time by checking if pip is the latest version before upgrading it:

pip --version
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like