安装hashLib会产生SyntaxError:调用'print'时缺少括号]]

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

我需要一个简单的哈希函数来输入密码,并认为我可以使用hashlib。 PyCharm建议通过运行pip install hashLib进行安装。

但是现在PyCharm正在抱怨库中的语法错误:

Collecting hashLib
Using cached https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/6_/8g1vyy5n1t1859x2d30ssk480000gn/T/pycharm-packaging/hashLib/setup.py", line 68
    print "unknown OS, please update setup.py"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("unknown OS, please update setup.py")?

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/6_/8g1vyy5n1t1859x2d30ssk480000gn/T/pycharm-packaging/hashLib/

[这表明可能是与我使用的Python版本有关的问题(我尝试使用python 2.7和python 3.8,但它们都不起作用)。

请确保您使用此软件包支持的Python版本。当前您正在使用Python 3.8。

我需要一个简单的哈希函数来输入密码,并认为我可以使用hashlib。 PyCharm建议通过运行pip install hashLib来安装它。但是现在PyCharm抱怨...

python pycharm hashlib
1个回答
2
投票
© www.soinside.com 2019 - 2024. All rights reserved.