python - 属性错误 : 'MSVCCompiler' object has no attribute 'linker_exe'

标签 python installation airflow

我正在尝试安装 AirFlow,但一直出现错误。该行 - pip 安装 apache-airflow

我用正确的包安装了 Visual Studio,安装了 misaka,并更新了 pip 安装版本和 setuptools。

结果——

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.

最佳答案

我遇到了同样的问题。似乎 airflow 1.10.4 对“dumb-init”有新的依赖,这在 Windows 上运行不佳。

安装 Airflow 1.10.3 对我来说效果很好。

pip install 'apache-airflow[postgres]==1.10.3'

关于python - 属性错误 : 'MSVCCompiler' object has no attribute 'linker_exe' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57466782/

相关文章:

Python gtk TextView 边框不适用于 css

laravel - 如何使用 laravel-mix 将 mdbootstrap vue 加载到 Laravel 5 中?

apache-spark - 如何在 Airflow 中将 Spark 作业属性传递给 DataProcSparkOperator?

airflow - 如何将带有参数的SQL作为文件传递给Airflow Operator

python - 如何考虑同一 DAG 中先前任务的结果来创建动态数量的任务?

python - 在多列上并行运行回归

python - Astropy 表操作 : How can I create a new table with rows grouped by values in a column?

python - 如何在Python中运行多线程进行多客户端套接字编程?

installation - 检查 DirectX 最终用户运行时的注册表

.net - 良好的安装程序,可以按需下载先决条件