一、pip install 与 python setup.py install区别
- pip install 模块名:在线安装,会安装相关的依赖包。
- python setup.py install:下载源码后本地安装,不会安装依赖包。
二、install 与 develop 的区别
- python setup.py install:
主要是安装典型第三方包,这种包比较稳定,不再需要你去编辑、修改或是调试。
- python setup.py develop:
当你安装一个包后,这个包需要你不断修改,这样你就不得不重新安装,这时就采用这种安装方法。
三、setup.py 介绍
from setuptools import setup, find_packages
setup(
name = "loco",
version = "2.0",
keywords = ("loco", "xxx"),
description = "xxx sdk",
long_description = "xxx sdk for python",
license = "MIT Licence",
url = "http://loco.com",
author = "loco",
author_email = "loco@gmail.com",
packages = find_packages(exclude=["tests.*", "tests"]),
include_package_data = True,
zip_safe=False,
platforms = "any",
install_requires = [],
scripts = [],
entry_points = {
'console_scripts': [
'test = test.help:main'
]
}
data_files=data_files
)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/markdown_views-ea0013b516.css">
</div>