antoinecarme / pyaf

PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
BSD 3-Clause "New" or "Revised" License
457 stars 73 forks source link

ModuleNotFoundError: No module named 'pyaf.ForecastEngine' #150

Closed eoagustin closed 3 years ago

eoagustin commented 3 years ago

Hi,

Im encountering module not found error when running the demo python script. I imported the git through:

!pip3 install --upgrade git+https://github.com/antoinecarme/pyaf.git

When I tried looking at the submodules inside the module through git, this is what was returned:

from github_com.antoinecarme import pyaf def sort_by_type(t): return t[0].name attrs = [(type(getattr(pyaf, attr)), attr) for attr in dir(pyaf)] attrs.sort(key=sort_by_type) for t, n in attrs: print(t, n)

<class '_frozen_importlib.ModuleSpec'> spec <class 'NoneType'> doc <class '_frozen_importlib_external.SourceFileLoader'> loader <class 'dict'> builtins <class 'list'> path <class 'str'> cached <class 'str'> file <class 'str'> name <class 'str'> package

I also tried installing through pip but to no use

eoagustin commented 3 years ago

I also tried answers from #123 but to no use

eoagustin commented 3 years ago

Please put double underscore as both prefix and suffix to .name of line return t[0].name for checking

antoinecarme commented 3 years ago

@eoagustin

Thanks for using PyAF.

I do not understand why you use :

from github_com.antoinecarme import pyaf

Isn't a simple

import pyaf

enough ?

eoagustin commented 3 years ago

Hello. Yes I was able to import it successfully. However, I encountered another issue and I dont know if I should post it here and edit the issue title and description instead.

Anyway, issue is that my subprocess.Popen was not able to find my dot.exe from graphviz. Im using cloudera data science workbench. I installed graphviz through conda (local) since its not permitted in our group to use sudo apt install graphviz (which was mentioned as solution in other issues in this git). I located the directory of the dot.exe in my local and added it in my os.environ("PATH") so that I can use it in cds workbench. However, it wasnt able to find the executable in the said path.

pydot==1.4.1 graphviz==0.15 pyaf==2.0.1 Python 3.6.1

antoinecarme commented 3 years ago

Nice to see that you are able to import pyaf.

The issue you describe is related with the way you installed pydot/graphzviz. The great guys at pydot are probably better for getting more help on this.

https://github.com/pydot/pydot