最近更新了python解釋器3.7python
結果安裝gevent,在導入gevent以後就報錯了,錯誤信息以下this
RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
return f(*args, **kwds)
看到如今寫這個問題的帖子很少,就先貼出來了。spa
只須要執行一下下面這段代碼就能夠了code
pip3 install -U --force-reinstall --no-binary :all: gevent
附上參數說明orm
-U, --upgrade Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used. --force-reinstall Reinstall all packages even if they are already up-to-date. --no-binary <format_control> Do not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all binary packages, :none: to empty the set, or one or more package names with commas between them. Note that some packages are tricky to compile and may fail to install when this option is used on them.
這條命令的大概意思就是使用非二進制的包從新安裝gevent以及它的依賴。blog
總之在執行這個命令以後就完美的解決問題了。ip
目前安裝的gevent版本和greenlet版本分別是1.3.5和0.4.14ci