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

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/*
主站蜘蛛池模板: 黄石市| 望江县| 恩施市| 宜阳县| 明星| 大冶市| 张掖市| 崇阳县| 哈密市| 中牟县| 九台市| 高州市| 读书| 灵璧县| 合水县| 吕梁市| 旌德县| 建始县| 犍为县| 丹巴县| 尉犁县| 盐池县| 紫阳县| 上虞市| 莱阳市| 旌德县| 南昌市| 太仓市| 西丰县| 三河市| 巴林右旗| 阳原县| 迁西县| 通海县| 永修县| 苏尼特右旗| 乌兰察布市| 贵南县| 垫江县| 镇赉县| 红安县|