什么是setup.py? [英] What is setup.py?

查看:78
本文介绍了什么是setup.py?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释一下 setup.py 是什么以及如何配置或使用它?

Can anyone please explain what setup.py is and how it can be configured or used?

推荐答案

setup.py 是一个 python 文件,它的存在表明您将要安装的模块/包具有可能与 Distutils 一起打包和分发,Distutils 是分发 Python 模块的标准.

setup.py is a python file, the presence of which is an indication that the module/package you are about to install has likely been packaged and distributed with Distutils, which is the standard for distributing Python Modules.

这使您可以轻松安装 Python 包.通常这样写就足够了:

This allows you to easily install Python packages. Often it's enough to write:

$ pip install . 

pip 将使用 setup.py 来安装你的模块.避免直接调用setup.py.

pip will use setup.py to install your module. Avoid calling setup.py directly.

https://docs.python.org/3/installing/index.html#installing-index

这篇关于什么是setup.py?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆