How to use Python's pip to download and keep the zipped files for a package?

前端 未结 8 940
暗喜
暗喜 2020-11-28 18:48

If I want to use the pip command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-social

8条回答
  •  情深已故
    2020-11-28 19:35

    installing python packages offline

    For windows users:

    To download into a file open your cmd and folow this:

    cd <*the file-path where you want to save it*>

    pip download <*package name*>

    the package and the dependencies will be downloaded in the current working directory.

    To install from the current working directory:

    set your folder where you downloaded as the cwd then follow these:

    pip install <*the package name which is downloded as .whl*> --no-index --find-links <*the file locaation where the files are downloaded*>

    this will search for dependencies in that location.

提交回复
热议问题