pkg_resources.ResolutionPython setup.py安装出错



在使用python setup.py develop时,我曾经能够从模块my-runner运行命令runner.py。然而,从那以后,我使用python setup.py install重新安装了它,现在调用runner.py时得到了pkg_resources.ResolutionError

这是迷你树结构

.
├── bin
│   ├── some_other_file.py
│   ├── runner.py
├── setup.py

这是我的setup.py

from setuptools import setup, find_packages
setup(
name='my-runner',
version='1.0.0',
license='private',
author='MyName',
author_email='myname@myemail.com',
description='My Runner',
packages=find_packages(),
scripts=['bin/runner.py', 'bin/some_other_file.py']
)

运行命令runner.py返回错误

pkg_resources.ResolutionError: Script 'scripts/runner.py' not found in metadata at '/home/myname/module/my-runner.egg-info

我想我不知道为什么install会破坏它?我猜这与develop不读取egg-info目录有关,但希望找到这个问题的解决方案。

一种可能的方法是删除包(pip3卸载我的runner(并重新安装它(python setup.py安装(

最新更新