问题描述
我正在尝试设置PyGears,我已经使用pip安装了该软件包。我正在尝试使用命令行执行下面的两行代码。
from pygears import gear,Intf
from pygears.typing import Uint
这是我收到的错误:
Traceback (most recent call last):
File "test.py",line 1,in <module>
from pygears import gear,Intf
File "C:\Users\nikola\AppData\Local\Programs\Python\python36-32\lib\site-packages\pygears\__init__.py",line 15,in <module>
import pygears.typing
File "C:\Users\nikola\AppData\Local\Programs\Python\python36-32\lib\site-packages\pygears\typing\__init__.py",in <module>
from pygears.conf import PluginBase,reg
File "C:\Users\nikola\AppData\Local\Programs\Python\python36-32\lib\site-packages\pygears\conf\__init__.py",line 5,in <module>
from .trace import pygears_excepthook,register_issue,MultiAlternativeError
File "C:\Users\nikola\AppData\Local\Programs\Python\python36-32\lib\site-packages\pygears\conf\trace.py",line 400,in <module>
elif PYPY:
NameError: name 'PYPY' is not defined
据我了解,PyPy是cpython的替代解释器,但我不确定上述符号是否与此相关。我应该尝试将PyPy配置为我的解释器,还是这个问题是由其他原因引起的? 预先谢谢你
解决方法
更新:此问题已由https://github.com/bogdanvuk/pygears/commit/a27df7ce62cfe568978fad1f39d87372b5b9a531
修复。这看起来像是pygears中的错误。如果尝试使用python> = 3.7,则不应遇到此错误。