问题
I'm trying to install AirFlow, but keep getting an error. The line -
pip install apache-airflow
I installed Visual Studio with the proper packages, installed misaka, and updated both pip install version and setuptools.
The results -
Collecting apache-airflow
Using cached https://files.pythonhosted.org/packages/fc/c9/db9c285b51a58c426433787205d86e91004662d99b1f5253295619bdb0e4/apache_airflow-1.10.4-py2.py3-none-any.whl
Requirement already satisfied: future<0.17,>=0.16.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.16.0)
Requirement already satisfied: flask-appbuilder<2.0.0,>=1.12.5 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.13.1)
Requirement already satisfied: markdown<3.0,>=2.5.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (2.6.11)
Requirement already satisfied: alembic<2.0,>=1.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.0.11)
Requirement already satisfied: jinja2<2.11.0,>=2.10.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (2.10.1)
Requirement already satisfied: dill<0.3,>=0.2.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.2.9)
Requirement already satisfied: flask<2.0,>=1.1.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.1.1)
Requirement already satisfied: flask-login<0.5,>=0.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.4.1)
Collecting dumb-init>=1.2.2 (from apache-airflow)
Using cached https://files.pythonhosted.org/packages/7e/32/817e967fa6c20d4568537016a2f27f00d9c6194778a41835e185e4feea0c/dumb-init-1.2.2.tar.gz
Requirement already satisfied: sqlalchemy~=1.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.3.6)
Requirement already satisfied: lazy-object-proxy~=1.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.4.1)
Requirement already satisfied: thrift>=0.9.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.11.0)
Requirement already satisfied: configparser<3.6.0,>=3.5.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (3.5.3)
Requirement already satisfied: croniter<0.4,>=0.3.17 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.3.30)
Requirement already satisfied: termcolor==1.1.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.1.0)
Requirement already satisfied: psutil<6.0.0,>=4.2.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (5.6.3)
Requirement already satisfied: requests<3,>=2.20.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (2.22.0)
Requirement already satisfied: funcsigs==1.0.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.0.0)
Requirement already satisfied: python-daemon<2.2,>=2.1.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (2.1.2)
Requirement already satisfied: flask-admin==1.5.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.5.3)
Requirement already satisfied: flask-swagger==0.2.13 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.2.13)
Requirement already satisfied: cached-property~=1.5 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.5.1)
Requirement already satisfied: pygments<3.0,>=2.0.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (2.4.2)
Requirement already satisfied: tenacity==4.12.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (4.12.0)
Requirement already satisfied: flask-caching<1.4.0,>=1.3.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.3.3)
Requirement already satisfied: setproctitle<2,>=1.1.8 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.1.10)
Requirement already satisfied: tabulate<0.9,>=0.7.5 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.8.3)
Requirement already satisfied: tzlocal<2.0.0,>=1.4 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.5.1)
Requirement already satisfied: pendulum==1.4.4 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.4.4)
Requirement already satisfied: flask-wtf<0.15,>=0.14.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.14.2)
Requirement already satisfied: json-merge-patch==0.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.2)
Requirement already satisfied: zope.deprecation<5.0,>=4.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (4.4.0)
Requirement already satisfied: python-dateutil<3,>=2.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (2.8.0)
Requirement already satisfied: pandas<1.0.0,>=0.17.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.24.2)
Requirement already satisfied: gunicorn<20.0,>=19.5.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (19.9.0)
Requirement already satisfied: unicodecsv>=0.14.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.14.1)
Requirement already satisfied: colorlog==4.0.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (4.0.2)
Requirement already satisfied: iso8601>=0.1.12 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (0.1.12)
Requirement already satisfied: text-unidecode==1.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from apache-airflow) (1.2)
Requirement already satisfied: colorama<1,>=0.3.9 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (0.4.1)
Requirement already satisfied: click<8,>=6.7 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (7.0)
Requirement already satisfied: apispec[yaml]>=1.1.1<2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (2.0.2)
Requirement already satisfied: Flask-Babel<1,>=0.11.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (0.12.2)
Requirement already satisfied: Flask-OpenID<2,>=1.2.5 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (1.2.5)
Requirement already satisfied: Flask-SQLAlchemy<3,>=2.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (2.4.0)
Requirement already satisfied: Flask-JWT-Extended<4,>=3.18 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (3.21.0)
Requirement already satisfied: marshmallow<2.20,>=2.18.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (2.19.5)
Requirement already satisfied: marshmallow-enum<2,>=1.4.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (1.4.1)
Requirement already satisfied: marshmallow-sqlalchemy>=0.16.1<1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (0.17.0)
Requirement already satisfied: prison==0.1.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (0.1.0)
Requirement already satisfied: jsonschema>=3.0.1<4 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (3.0.2)
Requirement already satisfied: PyJWT>=1.7.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (1.7.1)
Requirement already satisfied: Mako in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from alembic<2.0,>=1.0->apache-airflow) (1.1.0)
Requirement already satisfied: python-editor>=0.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from alembic<2.0,>=1.0->apache-airflow) (1.0.4)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from jinja2<2.11.0,>=2.10.1->apache-airflow) (1.1.1)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask<2.0,>=1.1.0->apache-airflow) (1.1.0)
Requirement already satisfied: Werkzeug>=0.15 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask<2.0,>=1.1.0->apache-airflow) (0.15.5)
Requirement already satisfied: six>=1.7.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from thrift>=0.9.2->apache-airflow) (1.11.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from requests<3,>=2.20.0->apache-airflow) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from requests<3,>=2.20.0->apache-airflow) (1.22)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from requests<3,>=2.20.0->apache-airflow) (2.6)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from requests<3,>=2.20.0->apache-airflow) (2018.1.18)
Requirement already satisfied: ordereddict in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from funcsigs==1.0.0->apache-airflow) (1.1)
Requirement already satisfied: lockfile>=0.10 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from python-daemon<2.2,>=2.1.1->apache-airflow) (0.12.2)
Requirement already satisfied: docutils in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from python-daemon<2.2,>=2.1.1->apache-airflow) (0.15.2)
Requirement already satisfied: setuptools in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from python-daemon<2.2,>=2.1.1->apache-airflow) (41.0.1)
Requirement already satisfied: wtforms in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-admin==1.5.3->apache-airflow) (2.2.1)
Requirement already satisfied: PyYAML>=3.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from flask-swagger==0.2.13->apache-airflow) (5.1.2)
Requirement already satisfied: pytz in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from tzlocal<2.0.0,>=1.4->apache-airflow) (2018.9)
Requirement already satisfied: pytzdata>=2018.3.0.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from pendulum==1.4.4->apache-airflow) (2019.2)
Requirement already satisfied: numpy>=1.12.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from pandas<1.0.0,>=0.17.1->apache-airflow) (1.13.3)
Requirement already satisfied: Babel>=2.3 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from Flask-Babel<1,>=0.11.1->flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (2.7.0)
Requirement already satisfied: python3-openid>=2.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from Flask-OpenID<2,>=1.2.5->flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (3.1.0)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from jsonschema>=3.0.1<4->flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (0.15.4)
Requirement already satisfied: attrs>=17.4.0 in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from jsonschema>=3.0.1<4->flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (19.1.0)
Requirement already satisfied: defusedxml in c:\users\ben\appdata\local\programs\python\python36\lib\site-packages (from python3-openid>=2.0->Flask-OpenID<2,>=1.2.5->flask-appbuilder<2.0.0,>=1.12.5->apache-airflow) (0.6.0)
Installing collected packages: dumb-init, apache-airflow
Running setup.py install for dumb-init ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\ben\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ben\\AppData\\Local\\Temp\\pip-install-xfdgqfty\\dumb-init\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ben\\AppData\\Local\\Temp\\pip-install-xfdgqfty\\dumb-init\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ben\AppData\Local\Temp\pip-record-4syt09xi\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Ben\AppData\Local\Temp\pip-install-xfdgqfty\dumb-init\
Complete output (33 lines):
running install
running build
running build_cexe
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ben\AppData\Local\Temp\pip-install-xfdgqfty\dumb-init\setup.py", line 135, in <module>
distclass=ExeDistribution,
File "c:\users\ben\appdata\local\programs\python\python36\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\ben\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\ben\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Ben\AppData\Local\Temp\pip-install-xfdgqfty\dumb-init\setup.py", line 95, in run
cmd = compiler.linker_exe + [f.name, '-static', '-o', os.devnull]
AttributeError: 'MSVCCompiler' object has no attribute 'linker_exe'
supports -static...
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\ben\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ben\\AppData\\Local\\Temp\\pip-install-xfdgqfty\\dumb-init\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ben\\AppData\\Local\\Temp\\pip-install-xfdgqfty\\dumb-init\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ben\AppData\Local\Temp\pip-record-4syt09xi\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
回答1:
I had the same issue. Seems like airflow 1.10.4 has a new dependency on "dumb-init" which doesn't work well on Windows.
Install Airflow 1.10.3 worked fine for me.
pip install 'apache-airflow[postgres]==1.10.3'
回答2:
Following on from Robin Sun's answer i used Airflow 1.10.3 then I got the setproctile error which i fixed by installing the C++ build tools Windows 10 SDK
回答3:
Airflow had never been officially supported on Windows (only Linux and MacOS are supported as execution environment).
For sure you were not able to run it on Windows - but maybe there are other usages (like development environment that some parts of Airflow could work).
It would be great to find out what kind of usage on Windows you want and used so far so that we can support it in future versions of Airflow. If you have any suggestions/comments or would like to describe your usage of Airflow so that Airflow committers might work out on how to support Windows users in the future.
There is a JIRA issue opened for it:
https://issues.apache.org/jira/browse/AIRFLOW-5375
回答4:
Experienced same issue when installing airflow in a virtual env.
- Had to install Visual Studio to get C++ build tools 14.0 & restart
- Then retried
pip install apache-airflow[postgres]==1.10.
来源:https://stackoverflow.com/questions/57466782/attributeerror-msvccompiler-object-has-no-attribute-linker-exe