python – Luigi Pipelining:在Windows中没有名为pwd的模块

我正在尝试执行
https://marcobonzanini.com/2015/10/24/building-data-pipelines-with-python-and-luigi/中给出的教程.

我可以使用本地调度程序自行运行程序,给我:

Scheduled 2 tasks of which:
* 2 ran successfully:
    - 1 PrintNumbers(n=1000)
    - 1 SquaredNumbers(n=1000)

This progress looks :) because there were no failed tasks or missing external de
pendencies

===== Luigi Execution Summary =====

但是,要尝试在服务器上进行可视化,当我尝试运行luigid –background时,它会抛出一个错误,说我没有pwd模块.
我找不到使用pip for windows的pwd模块.

  File "c:\users\alex\appdata\local\continuum\anaconda3\lib\site-packages
\luigi\process.py", line 79, in daemonize
    import daemon
  File "c:\users\alex\appdata\local\continuum\anaconda3\lib\site-packages
\daemon\__init__.py", line 42, in <module>
    from .daemon import DaemonContext
  File "c:\users\alex\appdata\local\continuum\anaconda3\lib\site-packages
\daemon\daemon.py", line 25, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'

我使用Python 3.6在Anaconda Spyder上工作

最佳答案 我能够通过安装python-daemon == 2.1.2来解决这个问题

如果您已经有python-daemon,请尝试降级到2.1.2版

在安装luigi之前这样做.

例:
pip install python-daemon == 2.1.2
然后
pip安装luigi.

点赞