Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Luigi Pipelining : No module named pwd in Windows

I am trying to execute the tutorial given in https://marcobonzanini.com/2015/10/24/building-data-pipelines-with-python-and-luigi/.

I am able to run the program on its own using local scheduler, giving me:

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 =====

However, to try the visualization on the server, when I try to run luigid --background, it throws me an error saying I dont have pwd module. I cannot find a pwd module using pip for windows.

  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'

I am working in Anaconda Spyder with Python 3.6

like image 754
ALEX MATHEW Avatar asked Jan 28 '23 01:01

ALEX MATHEW


2 Answers

I was able to fix this by installing python-daemon==2.1.2 If you already have python-daemon, try downgrading to version 2.1.2 Do this before install luigi.

Example: pip install python-daemon==2.1.2 then pip install luigi.

like image 187
Christian Avatar answered Jan 30 '23 16:01

Christian


For some reason, if you dont use the --background parameter on windows it will start just fine

just write luigid in cmd

like image 39
Steven G Avatar answered Jan 30 '23 16:01

Steven G