简体   繁体   English

与外部 Python 库共享项目

[英]Sharing projects with external Python libraries

How can I share a project (through Github) with someone when my project is using multiple personal modules/packages?当我的项目使用多个个人模块/包时,如何与某人共享项目(通过 Github)?

Using pip freeze > requirements.txt is obviously not enough, because there is no place to download packages I created specifically for this project.使用pip freeze > requirements.txt显然是不够的,因为没有地方可以下载我专门为这个项目创建的包。

Is pushing the contents of the project in my repository as a virtual environment viable solution?将项目内容推送到我的存储库中作为虚拟环境可行的解决方案吗?

What if I also need to have an older version of Python (3.6.5) for example?例如,如果我还需要旧版本的 Python (3.6.5) 怎么办?

Ty,泰,

What these "personal modules/packages" are?这些“个人模块/包”是什么? The only reason to make a separate package is reusability.制作单独的 package 的唯一原因是可重用性。

If you do not plan to use it somewhere else, then just include them as modules in your project.如果您不打算在其他地方使用它,那么只需将它们作为模块包含在您的项目中。

If you plan to use it somewhere else but don't think it could help somebody else then make a package and push it to to Github/Gitlab/Bitbucket/etc.如果您打算在其他地方使用它,但认为它不能帮助其他人,那么制作 package 并将其推送到 Github/Gitlab/Bitbucket/等。 It's possible to install dependencies from there using pip.可以使用 pip 从那里安装依赖项。

If you plan to use it somewhere else and want to share your work with all the python community - deploy package on PyPI.如果您打算在其他地方使用它并希望与所有 python 社区分享您的工作 - 在 PyPI 上部署 package。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM