皮普·格曼不能影响

2024-10-03 17:26:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经安装了gman,当然我已经运行了升级。在

pip install gmane --upgrade

然后给我看:

'Requirement already up-to-date: gmane in ./lib/python2.7/site-packages'

^{pr2}$

它显示了这些错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/code/site/local/lib/python2.7/site-packages/gmane/__init__.py", line 26, in <module>
    from .networkEvolution import NetworkEvolution
  File "/root/code/site/local/lib/python2.7/site-packages/gmane/networkEvolution.py", line 9, in <module>
    from .pca import *
  File "/root/code/site/local/lib/python2.7/site-packages/gmane/pca.py", line 79
    def __init__(self,*metrics,final_dimensions=2,draw=False):
                                              ^
SyntaxError: invalid syntax

有人帮忙吗?在


Tags: infrompyinitlibpackageslocalline
1条回答
网友
1楼 · 发布于 2024-10-03 17:26:48

我已经检查了错误,发现了错误“语法错误”。所以我写了一个非常简单的示例来确认它。在

class MyGmane:
    def __init__(self,*meteris ,final_dimensions=2,draw=False):
        pass

if __name__ == '__main__':
    mg = MyGmane()

我得到了以下错误:

^{pr2}$

在我更改init方法内部的顺序后,如下所示:

def __init__(self,final_dimensions=2,draw=False,*meteris):

然后它工作了,所以我修改了这个文件(第79行)

"/root/code/site/local/lib/python2.7/site-packages/gmane/pca.py" It's also work, so i guess there are maybe have a bug on 'game'!

相关问题 更多 >