布朗尼不工作:Cython 未定义符号 _PyGen_Send
Brownie not working: Cython undefined symbol _PyGen_Send
我在 Fedora 35 上设置我的开发环境,当我 运行 任何 brownie 命令如 $ brownie console
甚至 brownie --version
我得到以下错误:
Traceback (most recent call last):
File "/home/philippbunke/.local/bin/brownie", line 5, in <module>
from brownie._cli.__main__ import main
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/project/main.py", line 44, in <module>
from brownie.network import web3
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/network/account.py", line 12, in <module>
import eth_account
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/eth_account/__init__.py", line 1, in <module>
from eth_account.account import ( # noqa: F401
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/eth_account/account.py", line 8, in <module>
from cytoolz import (
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/cytoolz/__init__.py", line 3, in <module>
from .functoolz import *
ImportError: /home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/cytoolz/functoolz.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
设置:
Python=3.10.1
Cython=0.29.26
gcc/gcc-c=11.2.1-7.fc35.x86_64
Ganache CLI=v6.12.2
$ pipx list
venvs are in /home/philippbunke/.local/pipx/venvs
apps are exposed on your $PATH at /home/philippbunke/.local/bin
package eth-brownie 1.16.4, Python 3.10.1
- brownie
$ $PATH
/home/philippbunke/.local/bin:/home/philippbunke/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin
我花了一整天的时间试图修复这个错误,请帮帮我!
这里的问题好像是Python3.10.1!
我使用 anaconda 使用 Python 3.8.12 创建了一个新的虚拟环境,使用 pipx install --python python3.8 eth-brownie
安装了 brownie 并且成功了!
这里的诀窍是,还要告诉 pipx 使用另一个 python 版本,否则它会创建对全局 python 版本的依赖,即我的 python 3.10案例.
我在 Fedora 35 上设置我的开发环境,当我 运行 任何 brownie 命令如 $ brownie console
甚至 brownie --version
我得到以下错误:
Traceback (most recent call last):
File "/home/philippbunke/.local/bin/brownie", line 5, in <module>
from brownie._cli.__main__ import main
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/project/main.py", line 44, in <module>
from brownie.network import web3
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/network/account.py", line 12, in <module>
import eth_account
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/eth_account/__init__.py", line 1, in <module>
from eth_account.account import ( # noqa: F401
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/eth_account/account.py", line 8, in <module>
from cytoolz import (
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/cytoolz/__init__.py", line 3, in <module>
from .functoolz import *
ImportError: /home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/cytoolz/functoolz.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
设置:
Python=3.10.1
Cython=0.29.26
gcc/gcc-c=11.2.1-7.fc35.x86_64
Ganache CLI=v6.12.2
$ pipx list
venvs are in /home/philippbunke/.local/pipx/venvs
apps are exposed on your $PATH at /home/philippbunke/.local/bin
package eth-brownie 1.16.4, Python 3.10.1
- brownie
$ $PATH
/home/philippbunke/.local/bin:/home/philippbunke/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin
我花了一整天的时间试图修复这个错误,请帮帮我!
这里的问题好像是Python3.10.1!
我使用 anaconda 使用 Python 3.8.12 创建了一个新的虚拟环境,使用 pipx install --python python3.8 eth-brownie
安装了 brownie 并且成功了!
这里的诀窍是,还要告诉 pipx 使用另一个 python 版本,否则它会创建对全局 python 版本的依赖,即我的 python 3.10案例.