如何找到我Windows机器上已安装的确切Python模块

huangapple go评论71阅读模式
英文:

how to find exact modules of python which are there on my windows machine

问题

I work on python. My laptop is going to change to a new laptop.

Is there a command which i can run on my old laptop to see which python modules are installed,
and by which commands have i installed them?

so that I can ran that file on my new laptop to install all of them.

英文:

I work on python. My laptop is going to change to a new laptop.

Is there a command which i can run on my old laptop to see which python modules are installed,
and by which commands have i installed them?

so that I can ran that file on my new laptop to install all of them.

答案1

得分: 2

Open a Powershell terminal and use pip like this pip freeze > requirements.txt this will list all your modules inside the file requirements.txt, then copy this file to your new computer and then on it run this to install all the previous modules pip install -r requirements.txt

(Note: This is the translation of the code-related text you provided.)

英文:

Open a Powershell terminal and use pip like this pip freeze > requirements.txt this will list all your modules inside the file requirements.txt, then copy this file to your new computer and then on it run this to install all the previous modules pip install -r requirements.txt

huangapple
  • 本文由 发表于 2023年4月19日 17:18:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76052780.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定