如何使用 anaconda 安装 arch 包?

how to install the arch package with anaconda?

我正在尝试使用 Anaconda.

安装 arch 软件包 https://pypi.org/project/arch/

建议的安装运行良好

(base) C:\Users\john>conda install arch-py -c conda-forge
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\john\anaconda3

  added / updated specs:
    - arch-py


The following NEW packages will be INSTALLED:

  arch-py            conda-forge/win-64::arch-py-4.18-py38h294d835_0
  cython             conda-forge/win-64::cython-0.29.22-py38h885f38d_0
  icc_rt             pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
  patsy              conda-forge/noarch::patsy-0.5.1-py_0
  property-cached    conda-forge/noarch::property-cached-1.6.4-py_0
  scipy              pkgs/main/win-64::scipy-1.6.1-py38h14eb087_0
  statsmodels        conda-forge/win-64::statsmodels-0.12.2-py38h347fdf6_0

The following packages will be UPDATED:

  certifi            pkgs/main::certifi-2020.12.5-py38haa9~ --> conda-forge::certifi-2020.12.5-py38haa244fe_1

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-h5b45459_0
  conda               pkgs/main::conda-4.9.2-py38haa95532_0 --> conda-forge::conda-4.9.2-py38haa244fe_0
  openssl              pkgs/main::openssl-1.1.1j-h2bbff1b_0 --> conda-forge::openssl-1.1.1j-h8ffe710_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(base) C:\Users\john>spyder

不幸的是,我在启动时无法正确导入包Spyder

from arch import arch_model
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

我该怎么办? 谢谢!

该软件包需要最新版本的 numpy。我尝试删除 numpy 并重新安装版本 1.20.0(需要的版本)但没有成功。 Anaconda 会坚持 1.19

最终,我做了我早就该做的事。下载 miniconda(不是 anaconda)并只安装我需要的包。这样,使用 conda!

更新软件包时就不会出现恼人的冲突