Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装后面临一些依赖问题 #8

Open
congcong009 opened this issue Nov 11, 2024 · 1 comment
Open

安装后面临一些依赖问题 #8

congcong009 opened this issue Nov 11, 2024 · 1 comment

Comments

@congcong009
Copy link

congcong009 commented Nov 11, 2024

使用 pip 安装最新版本后,运行报警告,如下:

C:/Users/.../PycharmProjects/.../polars_ta_test.py
C:\Users\...\anaconda3\envs\...\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
C:\Users\...\anaconda3\envs\...\lib\site-packages\numpy\.libs\libopenblas.EL2C6PLE4ZYW3ECEVIV3OXXGRN2NRFM2.gfortran-win_amd64.dll
C:\Users\...\anaconda3\envs\...\lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
  warnings.warn("loaded more than 1 DLL from .libs:"

升级 Numpy 从 1.22.4 到 1.24.3,过程中提示

Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.22.4
    Uninstalling numpy-1.22.4:
      Successfully uninstalled numpy-1.22.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
numba 0.56.0 requires numpy<1.23,>=1.18, but you have numpy 1.24.4 which is incompatible.
Successfully installed numpy-1.24.3

再次运行代码,报错:

Traceback (most recent call last):
  File "C:/Users/.../PycharmProjects/.../polars_ta_test.py", line 134, in <module>
    from polars_ta.talib import *
  File "C:\Users\...\anaconda3\envs\...\lib\site-packages\polars_ta\talib\__init__.py", line 5, in <module>
    from polars_ta.utils.numba_ import batches_i1_o1, batches_i1_o2, batches_i2_o1, batches_i2_o2
  File "C:\Users\...\anaconda3\envs\...\lib\site-packages\polars_ta\utils\numba_.py", line 8, in <module>
    from numba import jit
  File "C:\Users\...\anaconda3\envs\...\lib\site-packages\numba\__init__.py", line 42, in <module>
    from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
  File "C:\Users\...\anaconda3\envs\...\lib\site-packages\numba\np\ufunc\__init__.py", line 3, in <module>
    from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
  File "C:\Users\...\anaconda3\envs\...\lib\site-packages\numba\np\ufunc\decorators.py", line 3, in <module>
    from numba.np.ufunc import _internal
SystemError: initialization of _internal failed without raising an exception

遂降级 numpy 至 1.22.4,报错和警告均消失。

建议在安装依赖时约束 numpy 的版本要求,即

requirements.txt

polars>=0.20.19
polars-ols>=0.3.0
numpy<1.23
numba
pandas
@wukan1986
Copy link
Owner

谢谢提醒

llvmlite==0.43.0
numba==0.60.0
numpy==1.26.4
pandas==2.2.3
polars==1.12.0
polars-ols==0.3.5
TA-Lib==0.4.32

这是我系统中的版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants