gpt4 book ai didi

python - Airflow initdb 失败 : ImportError: No module named log.logging_mixin

转载 作者:行者123 更新时间:2023-11-30 22:17:45 25 4
gpt4 key购买 nike

我在没有 root 访问权限的计算机上安装了airflow 1.7.0。所有内容都安装在/apps/dist/中,我是其所有者

$ pip install apache-airflow

我取得了很多成功,直到这:

Installing collected packages: webencodings, html5lib, bleach, configparser, flask-wtf, future, gunicorn, apache-airflow
Found existing installation: Flask-WTF 0.12
Uninstalling Flask-WTF-0.12:
Successfully uninstalled Flask-WTF-0.12
Found existing installation: future 0.15.2
Uninstalling future-0.15.2:
Successfully uninstalled future-0.15.2
Found existing installation: gunicorn 19.3.0
Uninstalling gunicorn-19.3.0:
Successfully uninstalled gunicorn-19.3.0
Exception:
Traceback (most recent call last):
File "/apps/dist/python/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/apps/dist/python/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/apps/dist/python/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/apps/dist/python/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/apps/dist/python/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/apps/dist/python/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/apps/dist/python/lib/python2.7/site-packages/pip/wheel.py", line 329, in clobber
os.utime(destfile, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: '/apps/dist/python/lib/python2.7/site-packages/airflow/configuration.py'
You are using pip version 9.0.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

所以我听取了他们的建议,升级了 pip:

$ pip install --upgrade pip
Collecting pip
Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 826kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.3

然后我重新运行 pip install apache-airflow,并得到 57 行“需求已满足”。下一步:

$ airflow initdb
Traceback (most recent call last):
File "/apps/dist/python/bin/airflow", line 17, in <module>
from airflow import configuration
File "/apps/dist/python/lib/python2.7/site-packages/airflow/__init__.py", line 29, in <module>
from airflow import configuration as conf
File "/apps/dist/python/lib/python2.7/site-packages/airflow/configuration.py", line 31, in <module>
from airflow.utils.log.logging_mixin import LoggingMixin
ImportError: No module named log.logging_mixin

我搜索了“ImportError:没有名为 log.logging_mixin 的模块”,并得到了一堆 pip 击讨论日志记录。因此,我搜索了 ImportError: No module named "log.logging_mixin",但基本上没有找到任何结果。

我错过了什么?

最佳答案

所以,问题在于 pip 高估了它的完成时间。

我卸载了airflow,然后重新安装了它,pip 提示/apps/dist/python/bin/airflow 的存在

再次卸载,删除/apps/dist/python/bin/airflow,重新安装,现在一切正常

关于python - Airflow initdb 失败 : ImportError: No module named log.logging_mixin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49544320/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com