简体   繁体   English

如何在Windows开发环境中使用python设置气流

[英]How to setup airflow with python for a windows development environment

At work we are completing a PoC of Airflow by AirBnB. 在工作中,我们正在通过AirBnB完成气流的PoC。 Standard operating practice is to decouple the development (ie DAG creation and python scripts etc) from the runtime environment. 标准操作实践是将开发(即DAG创建和python脚本等)与运行时环境分离。 Ie we are not allowed to script directly on the servers (bad practice anyway). 也就是说,我们不允许直接在服务器上编写脚本(无论如何都是不好的做法)。

As such, I have configured intelliJ to work with Python (works as expected) in Windows (we are not allowed to have unix workstations) but I cannot find a way to install airflow in Windows. 这样,我已经将intelliJ配置为可以在Windows中使用Python(按预期工作)(不允许使用unix工作站),但是我找不到在Windows中安装气流的方法。 I am new to Python with a Java development background. 我是具有Java开发背景的Python新手。

As such, how do I setup a local development environment IDEA ultimate for AirBnb/Airflow (there is no documentation ? 因此,如何为AirBnb / Airflow设置本地开发环境IDEA Ultimate(没有文档?

I have it working and compiling with the following step: The steps below are for using intelliJ Ultimate edition, download the python modules. 我使用以下步骤进行工作和编译:以下步骤用于使用intelliJ Ultimate版本,请下载python模块。

  1. Download the python extension for InttelliJ Ultimate edition or PyCharm 下载InttelliJ Ultimate Edition或PyCharm的python扩展
  2. Configure and install python 2.7 for Windows. 为Windows配置并安装python 2.7。
  3. Add the SDK to IDEA 将SDK添加到IDEA
  4. Configure the following proxy details in environment variables to install modules using PIP -> HTTP_PROXY=http : // user:password@your-company-proxy.com:8080 HTTPS_PROXY=http : // user:password@your-company-proxy.com:8080 (remove spaces, not allowed to post multiple links) 在环境变量中配置以下代理详细信息以使用PIP-> HTTP_PROXY = http:// user:password@your-company-proxy.com:8080 HTTPS_PROXY = http:// user:password @ your-company-proxy安装模块。 com:8080(删除空格,不允许发布多个链接)
  5. Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). 需要Microsoft Visual C ++ 9.0(无法找到vcvarsall.bat)。 Get it from http://aka.ms/vcpython27 http://aka.ms/vcpython27获取
    C:_downloads>msiexec /i VCForPython27.msi ALLUSERS=1 C:_downloads> msiexec / i VCForPython27.msi ALLUSERS = 1
  6. pip install airflow 点安装气流
  7. Create a new project, configure it as a python module. 创建一个新项目,将其配置为python模块。
  8. Download the GIT repository -> airflow 下载GIT信息库-> airflow
  9. Configure your path correctly, also set a python home and AIRFLOW_HOME. 正确配置您的路径,还设置一个python home和AIRFLOW_HOME。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM