为了使软件包保持最新状态,是否有 pip freeze 的替代方案?
因此,我正在通过我的 Ipad 使用 Gitpod 设置一个 Github 存储库。我了解到我可以使用此命令来轻松加载 .gitpod.yml 文件的每个需求。
pip freeze > requirements.txt
我的问题是:在需求文件中,软件包列出了它们的当前版本,但我希望它们全部采用以下形式:
pandas==*
而不是:
pandas==1.4.1
提前感谢您的帮助!
So I am setting up a Github repository with Gitpod through my Ipad. I learned I could use this command in order to easily load every requirement with the .gitpod.yml file.
pip freeze > requirements.txt
My question is: inside the requirements file, the packages are listed with their current version, but I would love them all to be of the form:
pandas==*
and not:
pandas==1.4.1
Thanks in advance for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以这样做:
You can do:
然后将条目设置为
pandas
,不带任何版本号:每当您执行
pip install --upgrade -rrequirements.txt
时,它都会升级到最新版本。请注意,您不应在生产环境中执行此操作,因为未来版本可能与您当前的代码或其他库不兼容。
Then put the entry as just
pandas
without any version number:It will upgrade to the latest version whenever you do
pip install --upgrade -r requirements.txt
.Note that you shouldn't do this in a production environment because it's possible for a future version to become incompatible with your current code or other libraries.