安装pyneurgen当语法错误 - 无效的语法

问题描述 投票:0回答:1

我在Python是新的,并试图在Windows中安装10 PyNeurGen库 调用的easy_install pyneurgen在PowerShell中我看到:

  File "C:\Program Files\Anaconda3.5\lib\site-packages\pyneurgen-0.3.1-py3.5.egg\pyneurgen\neuralnet.py", line 613
    print "sample: %s errors: %s" % (
                                ^
SyntaxError: invalid syntax

当我再次调用安装我看到:

Best match: pyneurgen 0.3.1
Processing pyneurgen-0.3.1-py3.5.egg
pyneurgen 0.3.1 is already the active version in

Using c:\program files\anaconda3.5\lib\site-packa
Processing dependencies for pyneurgen
Finished processing dependencies for pyneurgen

当我使用PyNeurGen运行一个简单的脚本,我看到PyCharm相同的错误:

  File "<frozen importlib._bootstrap_external>", line 533, in spec_from_file_location
  File "C:\Program Files\Anaconda3.5\lib\site-packages\pyneurgen-0.3.1-py3.5.egg\pyneurgen\neuralnet.py", line 613
    print "sample: %s errors: %s" % (
                                ^
SyntaxError: invalid syntax

任何建议如何解决这个问题?

python powershell installation
1个回答
0
投票

问题是相对于源代码。当你通过点击其开放的源代码显示发生错误的位置。你会发现打印功能的语法是错误的。一旦你纠正它,代码将照常工作。

© www.soinside.com 2019 - 2024. All rights reserved.