新建setup.py文件

写入

from setuptools import setup

setup(
    name='tickets',        #定义你项目的名称
    py_modules=['tickets', 'stations'],  #包含的python文件
    install_requires=['requests', 'docopt', 'prettytable', 'colorama'],  #python文件中用到的模块
    entry_points={
        'console_scripts': ['tickets=tickets:cli']   #第一个启动的函数
    }
)

  

然后在终端

python3 setup.py install --record 1.txt          #将安装的路径信息保存放到1.txt ,方便卸载

  

卸载

cat 1.txt | xargs rm -rf

  

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2021-09-30
  • 2021-08-03
  • 2021-08-03
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-09-13
  • 2021-11-20
  • 2021-12-12
  • 2021-11-02
  • 2021-11-23
相关资源
相似解决方案