My Ubuntu OS had some problem so I mounted it on a recovery(temporary) OS. Now I have access to all my previous files from the path /mnt
(eg the 'home' folder will be at /mnt/home/
).
I need to generate a requirements.txt
file of all the Python2.7 libraries installed in my previous OS. If is use pip freeze
, I get the list of libraries of only the current OS.
How do I generate the requirements.txt
from a mounted filesystem?
you can execute a chroot inside your mount point for example
chroot /mnt
and after execute:
pip freeze
for show the system library you can execute:
dpkg -l | grep python
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.