简体   繁体   English

如何将 Python 上已安装的库导出到一个安装 shell?

[英]How can I export installed libraries on Python to one install shell?

Recently, I'm changing Linux distro from PopOs to Ubuntu, and there is a lot of libraries installed by pip on Python that I want to bring on.最近,我正在将 Linux 发行版从 PopOs 更改为 Ubuntu,并且我想在 Python 上通过 pip 安装很多库。 Could I migrate from these other distros, exporting and import all installed libraries on python?我可以从这些其他发行版迁移,在 python 上导出和导入所有已安装的库吗? There's a way to do that?有没有办法做到这一点?

You should read about the pip cache system and how to enabled in different OS.您应该阅读有关pip 缓存系统以及如何在不同操作系统中启用的信息。 If you already have a pip cache directory configured you can tell where is by:如果您已经配置了 pip 缓存目录,您可以通过以下方式判断它在哪里:

pip cache dir

And then you could copy the content of your current cache dir to the one in your new distro.然后您可以将当前缓存目录的内容复制到新发行版中的内容。

References:参考:

  1. Where is pip cache folder pip缓存文件夹在哪里
  2. Pip cache documentation Pip缓存文档

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

相关问题 Docker:无法从 dockerfile 安装 Python 库,尽管可以从容器的 Z456941C98B7E418 中手动安装它们 - Docker: unable to install Python libraries from dockerfile, though they can be installed manually from within the container's shell 如何查看python中已安装的库? - how can I see my installed libraries in python ? 安装Python 3后如何安装Open CV? - How can I install Open CV after I installed Python 3? 如何在 Jython 中安装各种 Python 库? - How can I install various Python libraries in Jython? 如何在Google Cloud Shell上安装库python-docx / docx? - How to install libraries python-docx / docx on Google Cloud Shell? 如何在 python shell AWS Glue 作业中导入外部 python 库 - How can I import external python libraries in python shell AWS Glue job 如何为pip安装的python包启用shell命令行参数? - How can one enable a shell command line argument for a python package installed for pip? 如果我有多个Python版本,如何将第三方库安装到特定的Python版本中? - How can I install third party libraries into the spcified Python version if I have multiple Python versions? 使用shell脚本安装python库 - Install python libraries using shell script 无法安装 python 库 - Can't install python libraries
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM