从 algokit 框架运行 python 合约时出现 numpy 错误

问题描述 投票:0回答:1

当我尝试将合约脚本运行到 algokit 项目时,它告诉我此错误消息,

这来自导入的库 numpy

numpy==2.0.0 算法==0.6.1

>    
>     File "C:\Users\LocalUser\algo\.venv\Lib\site- 
  packages\algopy\__init__.py",
> line 72, in <module>     warnings.simplefilter("ignore",
> numpy.ComplexWarning)                                    
> ^^^^^^^^^^^^^^^^^^^^ 
   AttributeError: module 'numpy' has no attribute
> 'ComplexWarning'
> 
> ```
python numpy blockchain developer-tools
1个回答
0
投票

看来您错误地安装了 algopy 而不是 algokit。

可能的修复:

pip uninstall algopy
pip install algokit
© www.soinside.com 2019 - 2024. All rights reserved.