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
458 stars 73 forks source link

ModuleNotFoundError: No module named 'multiprocess' #114

Closed maki-markie closed 4 years ago

maki-markie commented 4 years ago

Hi There! Im doing some forecasting based on this package but having a problem and difficulties to make it run. Calling: lEngine.train(iInputDS = df, iTime = "datum", iSignal = "krank_pct", iHorizon = 12); datum = datetime column "YYYY-MM-DD" krank_pct = numeric iHorizon = 12 for months because i have a monthly data

The call throws me an error: ModuleNotFoundError: No module named 'multiprocess' I just dont know where the mistake lies. Can someone maybe help me to make it run?

Thanks a lot in advance! M

antoinecarme commented 4 years ago

@maki-markie

Thanks for using PyAF.

Multiprocessing is a standard python package, you can (re-)install it with a command line like :

pip install multiprocessing

By the way, to better help you, can you please copy-paste the output of this script :

https://github.com/antoinecarme/pyaf/blob/master/tests/basic_checks/platform_info.py

maki-markie commented 4 years ago

can i run this https://github.com/antoinecarme/pyaf/blob/master/tests/basic_checks/platform_info.py in a jupyter notebook?

maki-markie commented 4 years ago

and BTW im already using Python 3.7.4 inside a venv. Why do i need to pip install multiprocessing when python already is?

antoinecarme commented 4 years ago

can i run this https://github.com/antoinecarme/pyaf/blob/master/tests/basic_checks/platform_info.py in a jupyter notebook?

No. you need a python interpreter like any python script.

antoinecarme commented 4 years ago

and BTW im already using Python 3.7.4 inside a venv. Why do i need to pip install multiprocessing when python already is?

Looking closer, the missing package is 'multiprocess' not 'multiprocessing'. PyAF does not use such module. Do you have a copy of the stack trace to see where the script fails ?

maki-markie commented 4 years ago

This are my output of the script. Funny enough keras_version is not installed even i did pip install keras alread --> Using TensorFlow backend

Using TensorFlow backend. PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('Cython_version', '0.29.13') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('keras_version', 'NOT_INSTALLED') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('matplotlib_version', '3.1.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('numpy_version', '1.17.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pandas_version', '0.25.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pip_version', '19.2.3') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pydot_version', '1.4.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_implementation', 'CPython') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_version', '3.7.4') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('scipy_version', '1.3.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('setuptools_version', '41.2.0') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sklearn_version', '0.21.3') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sqlalchemy_version', '1.3.8') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_platform', 'Windows-2012ServerR2-6.3.9600-SP0') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_processor', 'Intel64 Family 6 Model 79 Stepping 1, GenuineIntel') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_uname', uname_result(system='Windows', release='2012ServerR2', version='6.3.9600', machine='AMD64', processor='Intel64 Family 6 Model 79 Stepping 1, GenuineIntel')) PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('xgboost_version', 'NOT_INSTALLED') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('ALLUSERSPROFILE', 'C:\ProgramData') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('APPDATA', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CLASSPATH', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CLIENTNAME') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COLORTERM', 'truecolor') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COMMONPROGRAMFILES', 'C:\Program Files\Common Files') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COMMONPROGRAMFILES(X86)', 'C:\Program Files (x86)\Common Files') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COMMONPROGRAMW6432', 'C:\Program Files\Common Files') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COMPUTERNAME') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COMSPEC', 'C:\Windows\system32\cmd.exe') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('EXEPATH', 'C:\Program Files\Git\bin') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('FP_NO_HOST_CHECK', 'NO') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('HOME', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('HOMEDRIVE', 'C:') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('HOMEPATH', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('KMP_DUPLICATE_LIB_OK', 'True') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LANG', 'en_US.UTF-8') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LOCALAPPDATA', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LOGONSERVER', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MAGICK_HOME', 'C:\Program Files\ImageMagick-6.9.8-Q16') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MSYSTEM', 'MINGW64') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NUMBER_OF_PROCESSORS', '4') PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('OLDPWD', ) PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('OS', 'Windows_NT')

maki-markie commented 4 years ago

it just keep repeating the error message: Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess'

antoinecarme commented 4 years ago

Strange enough and not very informative. Can you please run it outside a jupyter notebook and stop it with Ctrl-C if it does not stop.

maki-markie commented 4 years ago

hi @antoinecarme i didnt run it inside a jupyter notebook. I ran it outside in a script and thats the error message im getting. :/

antoinecarme commented 4 years ago

Hi.

Did you run this :

pip install scipy pandas sklearn matplotlib pydot dill pathos sqlalchemy xgboost

maki-markie commented 4 years ago

Hi @antoinecarme yes i did. Requirements all satisfied. PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('Cython_version', '0.29.13') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('keras_version', '2.2.5') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('matplotlib_version', '3.1.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('numpy_version', '1.17.2') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pandas_version', '0.25.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pip_version', '19.2.3') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pydot_version', '1.4.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_implementation', 'CPython') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_version', '3.7.4') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('scipy_version', '1.3.1') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('setuptools_version', '41.2.0') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sklearn_version', '0.21.3') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sqlalchemy_version', '1.3.8') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_platform', 'Windows-2012ServerR2-6.3.9600-SP0') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_processor', 'Intel64 Family 6 Model 79 Stepping 1, GenuineIntel') PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('xgboost_version', '0.90')

antoinecarme commented 4 years ago

Sometimes, re-running a "pip install" shows previous errors.

and

pip install multiprocess

?

antoinecarme commented 4 years ago

pathos and dill do not show in the list. I have to add these.

maki-markie commented 4 years ago

i run this: pip install scipy pandas sklearn matplotlib pydot dill pathos sqlalchemy xgboost the output was requirements already satisfied. also pip install multiprocess again and and the output is once again requirements already satisfied.

but still getting the module not found multiprocess error

antoinecarme commented 4 years ago

does multiprocess show in

pip list

output ?

antoinecarme commented 4 years ago

I just updated the platform_info script to include pathos and dill. multiprocess is a dependency on pathos.

maki-markie commented 4 years ago

yeah the multiprocess show in the pip list: $ pip list Package Version


absl-py 0.8.0 appdirs 1.4.3 astor 0.8.0 astroid 2.2.5 attrs 19.1.0 backcall 0.1.0 black 19.3b0 bleach 3.1.0 Click 7.0 colorama 0.4.1 cycler 0.10.0 Cython 0.29.13 decorator 4.4.0 defusedxml 0.6.0 dill 0.3.0 entrypoints 0.3 gast 0.3.1 google-pasta 0.1.7 grpcio 1.23.0 h5py 2.10.0 ipykernel 5.1.2 ipython 7.8.0 ipython-genutils 0.2.0 ipywidgets 7.5.1 isort 4.3.21 jedi 0.15.1 Jinja2 2.10.1 joblib 0.13.2 jsonschema 3.0.2 jupyter 1.0.0 jupyter-client 5.3.1 jupyter-console 6.0.0 jupyter-core 4.5.0 Keras 2.2.5 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 kiwisolver 1.1.0 lazy-object-proxy 1.4.2 Markdown 3.1.1 MarkupSafe 1.1.1 matplotlib 3.1.1 mccabe 0.6.1 mistune 0.8.4 multiprocess 0.70.8 nbconvert 5.6.0 nbformat 4.4.0 notebook 6.0.1 numpy 1.17.2 pandas 0.25.1 pandocfilters 1.4.2 parso 0.5.1 pathos 0.2.4 patsy 0.5.1 pickleshare 0.7.5 pip 19.2.3 pox 0.2.6 ppft 1.6.6.1 prometheus-client 0.7.1 prompt-toolkit 2.0.9 protobuf 3.9.1 pyaf 1.0 pydot 1.4.1 Pygments 2.4.2 pylint 2.3.1 pyparsing 2.4.2 pyrsistent 0.15.4 python-dateutil 2.8.0 pytz 2019.2 pywinpty 0.5.5 PyYAML 5.1.2 pyzmq 18.1.0 qtconsole 4.5.5 scikit-learn 0.21.3 scipy 1.3.1 Send2Trash 1.5.0 setuptools 41.2.0 six 1.12.0 sklearn 0.0 SQLAlchemy 1.3.8 statsmodels 0.10.1 tensorboard 1.14.0 tensorflow 1.14.0 tensorflow-estimator 1.14.0 termcolor 1.1.0 terminado 0.8.2 testpath 0.4.2 toml 0.10.0 tornado 6.0.3 traitlets 4.3.2 typed-ast 1.4.0 wcwidth 0.1.7 webencodings 0.5.1 Werkzeug 0.15.6 wheel 0.33.6 widgetsnbextension 3.5.1 wrapt 1.11.2 xgboost 0.90 xlrd 1.2.0

antoinecarme commented 4 years ago

it just keep repeating the error message: Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess'

Something is strange here the file name is empty. Do you have some special setting or init script ?

Can you share the full script you are running ?

antoinecarme commented 4 years ago

Do you have many python python interpreters (2 and 3) installed simultaneously ?

antoinecarme commented 4 years ago

Also, can you run this script :

python3 tests/func/test_ozone.py

maki-markie commented 4 years ago

it just keep repeating the error message: Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess'

Something is strange here the file name is empty. Do you have some special setting or init script ?

Can you share the full script you are running ?

Im just running the program_info script you gave me and all the requirements there are satisfied.

maki-markie commented 4 years ago

Do you have many python python interpreters (2 and 3) installed simultaneously ?

my venv is python3.7 im not running it on my main system, its running on a venv with python 3.7

maki-markie commented 4 years ago

Also, can you run this script :

python3 tests/func/test_ozone.py

where can i find this file?

antoinecarme commented 4 years ago

Also, can you run this script : python3 tests/func/test_ozone.py

where can i find this file?

https://github.com/antoinecarme/pyaf/blob/master/tests/func/test_ozone.py

antoinecarme commented 4 years ago

it just keep repeating the error message: Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess' Traceback (most recent call last): File "", line 1, in Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'multiprocess'

Something is strange here the file name is empty. Do you have some special setting or init script ? Can you share the full script you are running ?

Im just running the program_info script you gave me and all the requirements there are satisfied.

But the endless loop comes from running a python script, not platform_info.py. Can you share that script ?

maki-markie commented 4 years ago
def get_module_version_when_available(module_name):
    try:
        import importlib
        import warnings
        import tensorflow as tf

        # warnings.filterwarnings("ignore")
        warnings.filterwarnings("ignore", category=FutureWarning)

        mod = importlib.import_module(module_name)
        return mod.__version__
    except:
        return "NOT_INSTALLED"

def getVersions():

    import os, platform
    import warnings
    import tensorflow as tf

    # warnings.filterwarnings("ignore")
    warnings.filterwarnings("ignore", category=FutureWarning)

    lVersionDict = {}
    lVersionDict["system_platform"] = platform.platform()
    lVersionDict["system_uname"] = platform.uname()
    lVersionDict["system_processor"] = platform.processor()
    lVersionDict["python_implementation"] = platform.python_implementation()
    lVersionDict["python_version"] = platform.python_version()

    lModules = [
        "sklearn",
        "pandas",
        "numpy",
        "scipy",
        "matplotlib",
        "pydot",
        "sqlalchemy",
        "xgboost",
        "keras",
        "pip",
        "setuptools",
        "Cython",
        "xgboost",
        "keras",
        "pip",
        "setuptools",
        "Cython",
        "dill",
        "pathos",
    ]

    for module_name in lModules:
        lVersionDict[module_name + "_version"] = get_module_version_when_available(
            module_name
        )

    # print([(k, lVersionDict[k]) for k in sorted(lVersionDict)])
    return lVersionDict

lDict = getVersions()
for k in sorted(lDict.keys()):
    print("PYAF_SYSTEM_DEPENDENT_VERSION_INFO", (k, lDict[k]))

import os
import warnings
import tensorflow as tf

# warnings.filterwarnings("ignore")
warnings.filterwarnings("ignore", category=FutureWarning)

lDict = os.environ
for k in sorted(lDict.keys()):
    print("PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE", (k, lDict[k]))

this is what i ran to check all the depencies. but when i follow your jupyter notebook example the module not found error occurs with this line of code:

import pyaf.ForecastEngine as autof
# create a forecast engine. This is the main object handling all the operations
lEngine = autof.cForecastEngine()

# get the best time series model for predicting one week

#lEngine.train(iInputDS=df , iTime="datum" , iSignal="krank_pct", iHorizon=12, iExogenousData=None);
lEngine.train(iInputDS = df, iTime = "datum", iSignal = "krank_pct", iHorizon = 7);
#lEngine.getModelInfo() # => relative error 7% (MAPE)
antoinecarme commented 4 years ago

It only occurs inside a jupyter notebook ?

antoinecarme commented 4 years ago

If you can't share your code, I understand. but this will not make things easy.

maki-markie commented 4 years ago

If you can't share your code, I understand. but this will not make things easy.

the code is really nothing special. i just followed your jupyter notebook examples with this data:

datum | krank_pct
-- | --
01.01.2017 | 10,7
01.02.2017 | 7,6
01.03.2017 | 6,5
01.04.2017 | 5,3
01.05.2017 | 5,5
01.06.2017 | 5,9
01.07.2017 | 4,7
01.08.2017 | 3,5
01.09.2017 | 5,7
01.10.2017 | 5,5
01.11.2017 | 4,9
01.12.2017 | 4,5
01.01.2018 | 5,6
01.02.2018 | 7
01.03.2018 | 6,1
01.04.2018 | 5,2
01.05.2018 | 4,9
01.06.2018 | 4,5
01.07.2018 | 4,2
01.08.2018 | 3,4
01.09.2018 | 5,3
01.10.2018 | 5,9
01.11.2018 | 5,6
01.12.2018 | 7,1
01.01.2019 | 6,9
01.02.2019 | 6,7
01.03.2019 | 7,2
01.04.2019 | 6,7
01.05.2019 | 6,6
01.06.2019 | 5,1
01.07.2019 | 6,5

then this:

import warnings
import datetime as dt
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import statsmodels.api as sm

warnings.filterwarnings("ignore")
plt.style.use('seaborn-pastel') #seaborn-muted, seaborn-pastel fivethirtyeight
matplotlib.rcParams['axes.labelsize'] = 14
matplotlib.rcParams['xtick.labelsize'] = 12
matplotlib.rcParams['ytick.labelsize'] = 12
matplotlib.rcParams['text.color'] = 'k'

df = pd.read_excel('data/test.xlsx')
df["monat"] = df["datum"].dt.strftime('%Y-%m')
df.info()

df.plot("datum" , ["krank_pct"], figsize=(12, 6))

import pyaf.ForecastEngine as autof
# create a forecast engine. This is the main object handling all the operations
lEngine = autof.cForecastEngine()

# get the best time series model for predicting one week

#lEngine.train(iInputDS=df , iTime="datum" , iSignal="krank_pct", iHorizon=12, iExogenousData=None);
lEngine.train(iInputDS = df, iTime = "datum", iSignal = "krank_pct", iHorizon = 7);
#lEngine.getModelInfo() # => relative error 7% (MAPE)

It works until the plot. But when i this:lEngine.train(iInputDS = df, iTime = "datum", iSignal = "krank_pct", iHorizon = 7); i get the module not found error.

antoinecarme commented 4 years ago

Don't be too humble. You code is too special. You are working on an excel file (not provided) and it execution produces an endless loop.

I have no way of reproducing this error locally. You better find a local python expert. You can start by eliminating special stuff (excel file, plots, seaborn, etc)

maki-markie commented 4 years ago

Don't be too humble. You code is too special. You are working on an excel file (not provided) and it execution produces an endless loop.

I have no way of reproducing this error locally. You better find a local python expert. You can start by eliminating special stuff (excel file, plots, seaborn, etc)

I attached the data that im using. Maybe you could use it as well. The excel part wasnt the problem. The file was converted to a dataframe. As ive said, the autof.cForecastEgine.train method is giving that error message.

antoinecarme commented 4 years ago

I trust you, no problem., But I have no way to execute your script it without modifying it.

maki-markie commented 4 years ago

image

as you see here. the pyaf package was giving that error.

antoinecarme commented 4 years ago

I cannot reliably see/interpret anything outside my local setting. I need something reproducible,. A screenshot is not.

maki-markie commented 4 years ago

Also, can you run this script : python3 tests/func/test_ozone.py

where can i find this file?

https://github.com/antoinecarme/pyaf/blob/master/tests/func/test_ozone.py

BTW this script also gives me the same error message!

maki-markie commented 4 years ago

I cannot reliably see/interpret anything outside my local setting. I need something reproducible,. A screenshot is not.

you have my data. you have my requirements of my venv. the only thing left to do is to create a new venv with my requirements then use my data and see if you can reproduce those errors.

antoinecarme commented 4 years ago

@maki-markie

This seems to be a module import error, nothing to do with forecasting.

Please take some time to analyze your setting or find a local python expert to help you with your installation.

antoinecarme commented 4 years ago

Also, can you run this script : python3 tests/func/test_ozone.py

where can i find this file?

https://github.com/antoinecarme/pyaf/blob/master/tests/func/test_ozone.py

BTW this script also gives me the same error message!

This script was flawlessly run on an amazon machine some 37 minutes ago,

https://travis-ci.org/antoinecarme/pyaf/builds/582577665?utm_source=github_status&utm_medium=notification

maki-markie commented 4 years ago

@maki-markie

This seems to be a module import error, nothing to do with forecasting.

Please take some time to analyze your setting or find a local python expert to help you with your installation.

i will reinstall my venv again and let you know if it solved the problem.

maki-markie commented 4 years ago

Do you have many python python interpreters (2 and 3) installed simultaneously ?

yeah i do. but i used python 3.7 to create my venv

maki-markie commented 4 years ago

@maki-markie This seems to be a module import error, nothing to do with forecasting. Please take some time to analyze your setting or find a local python expert to help you with your installation.

i will reinstall my venv again and let you know if it solved the problem.

Ok, i deleted my old venv and reinstalled it. My python version is 3.7.4 run these pip commands:

pip install scipy pandas sklearn matplotlib pydot dill pathos sqlalchemy xgboost
pip install --upgrade git+git://github.com/antoinecarme/pyaf.git

run the program_info:

PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('Cython_version', '0.29.13')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('dill_version', '0.3.0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('keras_version', '2.2.5')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('matplotlib_version', '3.1.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('numpy_version', '1.17.2')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pandas_version', '0.25.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pathos_version', '0.2.4')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pip_version', '19.2.3')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pydot_version', '1.4.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_implementation', 'CPython')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_version', '3.7.4')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('scipy_version', '1.3.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('setuptools_version', '41.2.0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sklearn_version', '0.21.3')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sqlalchemy_version', '1.3.8')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_platform', 'Windows-2012ServerR2-6.3.9600-SP0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_processor', 'Intel64 Family 6 Model 79 Stepping 1, GenuineIntel')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_uname', uname_result(system='Windows', release='2012ServerR2', version='6.3.9600', machine='AMD64', processor='Intel64 Family 6 Model 79 Stepping 1, GenuineIntel'))
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('xgboost_version', '0.90')

Then run this script to test the PyAF package:

import warnings
import datetime as dt
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import statsmodels.api as sm

warnings.filterwarnings("ignore")
plt.style.use("seaborn-pastel")  # seaborn-muted, seaborn-pastel fivethirtyeight
matplotlib.rcParams["axes.labelsize"] = 14
matplotlib.rcParams["xtick.labelsize"] = 12
matplotlib.rcParams["ytick.labelsize"] = 12
matplotlib.rcParams["text.color"] = "k"

df = pd.read_excel("data/test_data.xlsx")
df["monat"] = df["datum"].dt.strftime("%Y-%m")
df.info()

df.plot("datum", ["krank_pct"], figsize=(12, 6))

# plt.show()

import pyaf.ForecastEngine as autof

# create a forecast engine. This is the main object handling all the operations
lEngine = autof.cForecastEngine()

# get the best time series model for predicting one week

# lEngine.train(iInputDS=df , iTime="datum" , iSignal="krank_pct", iHorizon=12, iExogenousData=None);
lEngine.train(iInputDS=df, iTime="datum", iSignal="krank_pct", iHorizon=7)
# lEngine.getModelInfo() # => relative error 7% (MAPE)

but still getting the Module Not Found error message

antoinecarme commented 4 years ago

Not sure if this can help, but module lookup behavior is very different between python2 and python3.

I see at least two things to do here :

  1. uninstall python2 from your machine and run the script. check that running python2 fails first.
  2. display the python version inside a jupyter cell with :

import sys print(sys.version_info)

(just in case jupyter is running a python2 ;)

maki-markie commented 4 years ago

Not sure if this can help, but module lookup behavior is very different between python2 and python3.

I see at least two things to do here :

  1. uninstall python2 from your machine and run the script. check that running python2 fails first.
  2. display the python version inside a jupyter cell with :

import sys print(sys.version_info)

(just in case jupyter is running a python2 ;)

image

As i already know... It takes my python 3.7.4 in the venv

maki-markie commented 4 years ago

It only occurs inside a jupyter notebook ?

It occurs in terminal and in jupyter notebook

maki-markie commented 4 years ago

Not sure if this can help, but module lookup behavior is very different between python2 and python3.

I see at least two things to do here :

  1. uninstall python2 from your machine and run the script. check that running python2 fails first.
  2. display the python version inside a jupyter cell with :

import sys print(sys.version_info)

(just in case jupyter is running a python2 ;)

i will uninstall python2 and if it doesnt work out then i will give up! lol :)

maki-markie commented 4 years ago

image

so after all the efforts, python2 uninstalled etc... still getting the Module Not Found error message

antoinecarme commented 4 years ago

Closing issue after no response for 30 days. Not blocking. Please repoen if needed.

eoagustin commented 3 years ago

Sorry but also getting the same module not found error. Also tried these commands but still to no use:

!pip3 install scipy pandas sklearn matplotlib pydot dill sqlalchemy xgboost !pip3 install --upgrade git+git://github.com/antoinecarme/pyaf.git !pip3 install --upgrade git+https://github.com/antoinecarme/pyaf.git