python - 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!
解决方案
/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 - Python - pandas 中的错误(在循环处理文件期间)
- node.js - 使用 Selenium 进行 Web 抓取的 NodeJs API
- c++ - 应用程序的自定义托盘菜单
- python - 使用 Python 的 Telnet SSH 连接 (Windows)
- firebase - Vuex:this.$store.dispatch 不是函数
- r - 采用数据框的功能
- python - 异常检测和 ADTK- 系列不遵循任何已知频率
- amazon-web-services - AWS Lambda SQS 触发器在重新创建队列后未触发
- javascript - 在交叉点观察器功能和元素转换完成之前,元素 CSS 属性不会在页面刷新时重置
- c# - 遇到特定值时暂停流