How do I fix the ERROR: Could not find a version that satisfies the requirement for uncompyle6-3.7.4-py3.8?

How do I fix the ERROR: Could not find a version that satisfies the requirement for uncompyle6-3.7.4-py3.8?

我从pypi.org网站下载了uncompyle6-3.7.4-py3.8 egg文件来反编译一个.pyc文件。当我尝试在命令提示符 pip install uncompyle6-3.7.4-py3.8 中使用 pip 命令安装它时,出现以下错误:

ERROR: Could not find a version that satisfies the requirement uncompyle6-3.7.4-py3.8 (from versions: none) 
ERROR: No matching distribution found for uncompyle6-3.7.4-py3.8

我使用的是最新版本的 Python (3.8)。我试图为早期的 3.7 版本下载另一个 uncompyle 文件,但即使那样我也会遇到同样的错误。我还将 pip 升级到最新版本。在他们的网站上提到,对于 Python 3.7 及更高版本,decompyle3 中的代码通常更好,但我在 pycdc 中遇到相同的错误。

我该如何解决这个错误?谢谢!

您可以使用 pip 安装 .whl 文件,而不是 .egg。为了安装 .egg 文件,您需要 easy_install。 试试这个命令:

python -m easy_install https://files.pythonhosted.org/packages/ef/91/07f46d34bf8d3bf385785b98b13ebddaa414638f553d9b33c8aa320f45cd/uncompyle6-3.7.4-py3.8.egg