ML-KULeuven / problog

ProbLog is a Probabilistic Logic Programming Language for logic programs with probabilities.
https://dtai.cs.kuleuven.be/problog/
317 stars 35 forks source link

problog web: ModuleNotFoundError: No module named 'resource' #89

Closed zhanghai4155 closed 2 years ago

zhanghai4155 commented 2 years ago

when run a command " problog web" in CLI, show the following information:

 File "d:\python\python_env\pytorch14_gpu\lib\site-packages\problog\web\server.py", line 50, in <module>
    import resource
ModuleNotFoundError: No module named 'resource'

problog version: 2.2.3 python version:3.7.6 platform: win10 64bits homebasic

VincentDerk commented 2 years ago

According to a quick search, it's because resource is a Unix specific package.

"resource is a Unix specific package as seen in https://docs.python.org/2/library/resource.html which is why it worked for you in Ubuntu, but raised an error when trying to use it in Windows."

https://stackoverflow.com/a/37713583