2

尝试运行brownie但遇到以下问题:


ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so, 
2): no suitable image found.  Did find:

/opt/homebrew/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so: 
   code signature in (/opt/homebrew/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so) 
not valid for use in process using Library Validation: 

  Trying to load an unsigned library

加载未签名的库时出错.cpython-39-darwin.so

4

1 回答 1

3

Brownie 依赖于该regex模块,其最新版本在 M1 Mac 上安装不正确。有关更多评论,请参见此处

作为一种解决方法,您可以在安装了 Brownie 的环境中尝试以下操作:

pip uninstall regex
pip install regex==2021.9.30
# to verify this is working
brownie init new_proj
于 2021-11-05T16:44:24.237 回答