处理模块先决条件的最佳实践
最近,我开始在笔记本上处理一个个人项目,如果一切顺利,它将被放置在其他地方的服务器中。问题是我使用模块。有些是从 apt-get 安装的,有些是从 easy_install 安装的,其中一两个直接放在子目录下,因为我对它们做了一些更改。我的问题是:有没有办法将所有这些东西移动到一起?此外,我不希望更新任何这些模块,因为它可能会破坏某些东西。怎么处理呢?
最后,我很确定我从一开始就以错误的方式做事。你们如何避免这些问题?
Recently I started working on a personal project in my notebook that, all going OK, it will be placed in a server elsewhere. The problem is that I make use of modules. Some were installed from apt-get, others from easy_install and one or two of those were placed directly under a subdirectory since I changed them a bit. My question is: is there a way to move all those things together? Moreover, I don't want any of those modules being updated since it may break something. How to handle that?
Finally, I'm pretty sure that I've done things the wrong way since the beginning. How do you guys work to avoid those problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 virtualenv。 Virtualenv 是一个创建隔离的 Python 环境的工具。
Have a look at virtualenv. Virtualenv is a tool to create isolated Python environments.