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

ALE*_*HEW 4 python pipelining python-3.x luigi

我正在尝试执行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 =====
Run Code Online (Sandbox Code Playgroud)

但是,要尝试在服务器上进行可视化,当我尝试运行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'
Run Code Online (Sandbox Code Playgroud)

我使用Python 3.6在Anaconda Spyder上工作

小智 5

我能够通过安装python-daemon == 2.1.2解决这个问题.如果你已经有python-daemon,请尝试降级到2.1.2版本在安装luigi之前执行此操作.

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


Ste*_*n G 4

由于某种原因,如果你不在 Windows 上使用 --background 参数,它会正常启动

只需要luigid在cmd中写入即可