问题:“ pip install –editable ./” vs“ python setup.py开发”

两者之间有什么明显区别

pip install -e /path/to/mypackage

和setuptools的变体?

python /path/to/mypackage/setup.py develop

Is there any significant difference between

pip install -e /path/to/mypackage

and the setuptools variant?

python /path/to/mypackage/setup.py develop

回答 0

尝试避免setup.py直接调用,它不会正确告诉pip您已安装软件包。

pip install -e

对于本地项目,相对于项目路径创建“ SomeProject.egg-info”目录。与仅使用相比setup.py develop,这是一个优势 ,它可以直接相对于当前工作目录创建“ egg-info”。

更多:文档

另请阅读setuptools的文档

Try to avoid calling setup.py directly, it will not properly tell pip that you’ve installed your package.

With pip install -e:

For local projects, the “SomeProject.egg-info” directory is created relative to the project path. This is one advantage over just using setup.py develop, which creates the “egg-info” directly relative the current working directory.

More: docs

Also read the setuptools’ docs.


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。