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

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/*
主站蜘蛛池模板: 丽水市| 资溪县| 乡宁县| 常熟市| 日土县| 科技| 松阳县| 汕尾市| 黔西县| 那曲县| 库尔勒市| 介休市| 长丰县| 固镇县| 临澧县| 新邵县| 五华县| 宣恩县| 禹州市| 抚远县| 茌平县| 句容市| 盐山县| 军事| 长白| 富平县| 大埔县| 文登市| 满洲里市| 伊金霍洛旗| 洞口县| 阜新市| 扶风县| 杭锦旗| 屯门区| 莱西市| 凤冈县| 河北区| 江津市| 叶城县| 海阳市|