pycharm中airflow azure包导入失败

pycharm中 包导入失败 求解答

!

img

报错信息

Collecting airflow
  Using cached airflow-0.6.tar.gz (1.2 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error
  
  python setup.py egg_info did not run successfully.
  exit code: 1
  
  [14 lines of output]
  running egg_info
  creating C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info
  writing C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info\PKG-INFO
  writing dependency_links to C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info\dependency_links.txt
  writing top-level names to C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info\top_level.txt
  writing manifest file 'C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info\SOURCES.txt'
  reading manifest file 'C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info\SOURCES.txt'
  writing manifest file 'C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-pip-egg-info-qzny08pz\airflow.egg-info\SOURCES.txt'
  Traceback (most recent call last):
    File "", line 2, in 
    File "", line 34, in 
    File "C:\Users\wang.kaixiang3\AppData\Local\Temp\pip-install-tt5foimd\airflow_3df1bc06a9f247a699fb4cb48f94b893\setup.py", line 32, in 
      raise RuntimeError('Please install package apache-airflow instead of airflow')
  RuntimeError: Please install package apache-airflow instead of airflow
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

你看到的这个错误消息表明,你正在尝试安装旧版本的 airflow 包。错误消息中提到,你应该安装 apache-airflow 包而不是 airflow 包。

你可以在终端/命令行中尝试运行下面的命令来安装 apache-airflow 包:

pip install apache-airflow

你还可以在 PyCharm 中安装包,方法是:

在 PyCharm 中打开项目。
选择 File > Settings。
在左侧导航栏中,选择 Project: [project name] > Project Interpreter。
在右侧窗口中,点击绿色加号按钮。
在弹出的对话框中,输入要安装的包的名称(例如,apache-airflow),然后点击 Install Package 按钮。
这应该能帮助你安装 apache-airflow 包,并解决你的导入错误。