我有一个 Python 2 软件包,我正在尝试将其升级到 Python 3。它是由曾经在我现在所在的同一团队工作的某个人编写的,但他已不再在公司工作,不幸的是,没有人离开公司团队能够提供帮助。
对包的文件运行 2to3 后,我运行python setup.py sdist
创建一个包,将该包放置在本地存储库中,然后尝试使用pip install
安装软件包。最终出现以下错误:
Exception:
Traceback (most recent call last):
File "/home/user/project/lib/python3.5/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/home/user/project/lib/python3.5/site-packages/pip/commands/install.py", line 297, in run
root=options.root_path,
File "/home/user/project/lib/python3.5/site-packages/pip/req/req_set.py", line 622, in install
**kwargs
File "/home/user/project/lib/python3.5/site-packages/pip/req/req_install.py", line 808, in install
self.move_wheel_files(self.source_dir, root=root)
File "/home/user/project/lib/python3.5/site-packages/pip/req/req_install.py", line 1003, in move_wheel_files
isolated=self.isolated,
File "/home/user/project/lib/python3.5/site-packages/pip/wheel.py", line 340, in move_wheel_files
assert info_dir, "%s .dist-info directory not found" % req
AssertionError: my-package-name .dist-info directory not found
旧的 Python 2 版本的包没有任何叫做.dist-info
在 .tgz 存档中,它安装得很好。有谁知道这里发生了什么以及如何解决它?