bashtage / arch

ARCH models in Python
Other
1.32k stars 245 forks source link

ModuleNotFoundError: No module named 'arch' when importing arch_model #671

Closed alfarocesar closed 1 year ago

alfarocesar commented 1 year ago

Hello,

I am encountering an issue with the arch library in Python. Whenever I try to import the arch_model module, I receive the following error: ModuleNotFoundError: No module named 'arch'

Here are the details of my setup: Python version: 3.11.3 Operating system: MAC Ventura 13.4.1

I have already attempted the following troubleshooting steps: Verified that the arch library is installed using pip list. Checked the installed versions of arch using pip show arch. Tried reinstalling arch using pip install --force-reinstall arch. Confirmed that I am working within the correct virtual environment. Despite these efforts, I am still unable to resolve the issue. Could you please provide guidance on how to fix this problem? Any assistance would be greatly appreciated.

Thank you, César

alfarocesar commented 1 year ago

Installed libraries in the virtual environment:

Package Version


arch 6.1.1.dev7+g6bf7e77 numpy 1.25.0 packaging 23.1 pandas 2.0.3 patsy 0.5.3 pip 23.1.2 python-dateutil 2.8.2 pytz 2023.3 scipy 1.11.1 setuptools 67.8.0 six 1.16.0 statsmodels 0.14.0 tzdata 2023.3 var 2023.6.2 wheel 0.38.4

bashtage commented 1 year ago

What command did you use to install arch?

alfarocesar commented 1 year ago

Thank you for your response. I have tried multiple commands, including:

pip install arch pip install git+https://github.com/bashtage/arch.git pip install --force-reinstall statsmodels arch pip install statsmodels arch

Despite these installation attempts, I am still encountering the 'ModuleNotFoundError' when trying to import the 'arch' library.

bashtage commented 1 year ago

Have you tried installing arch==6.0.0 to see if it version specific. I would also use commands like

python -m pip install arch==6.0
python -m IPython

Just to make sure you are using the right python.

alfarocesar commented 1 year ago

Hello, it didn´t work, Currently, these are the installed libraries in my virtual environment: appnope 0.1.3 arch 6.0.0 asttokens 2.2.1 backcall 0.2.0 decorator 5.1.1 executing 1.2.0 ipython 8.14.0 jedi 0.18.2 matplotlib-inline 0.1.6 numpy 1.25.0 packaging 23.1 pandas 2.0.3 parso 0.8.3 patsy 0.5.3 pexpect 4.8.0 pickleshare 0.7.5 pip 23.1.2 prompt-toolkit 3.0.38 ptyprocess 0.7.0 pure-eval 0.2.2 Pygments 2.15.1 python-dateutil 2.8.2 pytz 2023.3 scipy 1.11.1 setuptools 67.8.0 six 1.16.0 stack-data 0.6.2 statsmodels 0.14.0 traitlets 5.9.0 tzdata 2023.3 var 2023.6.2 wcwidth 0.2.6 wheel 0.38.4

bashtage commented 1 year ago

Have you resolved this? I can't reproduce it. I did

conda create -n arch-test python=3.11 ipython -y
conda activate arch-test
python -m pip install arch
python -m IPython

and then ran

from arch import arch_model

which worked as expected.

bashtage commented 1 year ago

Since I can't reproduce in a fresh environment, I'm going to close. Please continue to post if you are having problems.