简体   繁体   中英

Migrate all python2 packages to python3 with pip

I have been using Python2 and pip for a long time and recently installed Python3 and pip3. I want to migrate all pip packages to pip3. How to install all the package at one go?

Since my pip list shows a long list of packages installed using pip, it is very hectic to install them one by one using pip3.

假设您要为python3安装所有python2软件包,请使用

$ pip3 install --user `pip freeze`  

首先,使用pip freeze > requirements.txt pip3 install -r requirements.txt pip freeze > requirements.txt保存所有软件包,然后运行pip3 install -r requirements.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM