官术网_书友最值得收藏!

How to do it...

To create an archive (from the official documentation: https://pip.pypa.io/en/latest/user_guide/#installation-bundles), perform the following:

  1. Create a temporary directory:
      $ tempdir = $(mktemp -d /tmp/archive_dir)
  1. Create a wheel file:
      $ pip wheel -r requirements.txt --wheel-dir = $tempdir
  1. Let the OS know where to place the archive file:
      $ cwd = `pwd`
  1. Change to the temporary directory and create the archive file:
      $ (cd "$tempdir"; tar -cjvf "$cwd/<archive>.tar.bz2" *)

To install from an archive, do the following:

  1. Create a temporary directory:
      $ tempdir=$(mktemp -d /tmp/wheelhouse-XXXXX)
  1. Change to the temporary directory and unarchive the file:
      $ (cd $tempdir; tar -xvf /path/to/<archive>.tar.bz2)
  1. Use pip to install the unarchived files:
      $ pip install --force-reinstall --ignore-installed --upgrade --no-index --no-deps $tempdir/*
主站蜘蛛池模板: 太和县| 诸暨市| 醴陵市| 台东市| 山东| 乌拉特前旗| 沂水县| 舟山市| 山东省| 启东市| 冀州市| 仲巴县| 泰安市| 阿瓦提县| 天水市| 民勤县| 诸暨市| 潮州市| 衡水市| 建阳市| 和硕县| 翁牛特旗| 商南县| 南和县| 封丘县| 英吉沙县| 晋中市| 会泽县| 西乡县| 宁晋县| 尼勒克县| 台东县| 甘肃省| 呈贡县| 富宁县| 尼玛县| 年辖:市辖区| 泰顺县| 禄劝| 潞西市| 肥东县|