首页 > 解决方案 > How to install python packages from older version to newer version?

问题描述

i was working with python 3.7 and i installed recently python 3.8 in linux.

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.

Note: i install them in my system not using venv.

Thanks!

标签: pythonbashpippackage

解决方案


/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

推荐阅读