如何将python软件包从旧版本安装到新版本? [英] How to install python packages from older version to newer version?
本文介绍了如何将python软件包从旧版本安装到新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用python 3.7,最近在Linux中安装了python 3.8.
i was working with python 3.7 and i installed recently python 3.8 in linux.
是否有bash命令或脚本采用3.7版所有软件包的列表,并在3.8版中逐一安装.
Is there any bash command or script that take a list of all packages of 3.7 and install it one by one in 3.8 version.
我想避免每个包裹都手工做.
i want to avoid to do it by hand every package.
注意:我不使用venv将它们安装在我的系统中.
Note: i install them in my system not using venv.
谢谢!
推荐答案
/path_to_3.7_bin/python -m pip freeze > /home/packages_list.txt
然后
/path_to_3.8_bin/python -m pip install -r /home/packages_list.txt
这篇关于如何将python软件包从旧版本安装到新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文