Python - offline 3rd party library move

Sometimes, even if a pip library uses a domestic source, there will still be a timeout problem.
So if you have downloaded the package on other machines, you can directly move the package file to the current machine.

find site-packages

Generally, the packages downloaded by python will be in this folder.

  1. window:
    Enter in the cmd command line: python -m site
    the path after the returned USER_SITE is the path of the downloaded package, usually../python/lib/site-packages
  2. linux:
    /usr/bin/python
  3. conda environment:
    ../anaconda3/envs/环境名/lib/python/site-packages

copy move

Find the package you need and copy it. Note that a package of a library has two files. To copy at the same time, move the package to \site-packages on another computer and paste it to use.
insert image description here

Guess you like

Origin blog.csdn.net/DreamingBetter/article/details/129533063