在你的package文件夹所在的目录建立一个文件
setup.py
内容是
from setuptools import setup
setup(
name='package_name',
version='1.4',
packages=['package_name'],
install_requires=['keras<2.3', 'tensorflow<2'],
url='https://github.com/...',
license='MIT',
author='your name',
author_email='aaa@gmail.com',
description='the function of your package'
)
然后命令行执行 python setup.py install