pipenv 笔记

features

  • Automatically generates and checks file hashes for locked dependencies.
  • Automatically finds your project home, recursively, by looking for a Pipfile.
  • Automatically generates a Pipfile, if one doesn’t exist.
  • Automatically generates a Pipfile.lock, if one doesn’t exist.
  • Automatically creates a virtualenv in a standard location.
  • Automatically adds packages to a Pipfile when they are installed.
  • Automatically removes packages from a Pipfile when they are un-installed.
  • Also automatically updates pip.

总结:自动

解决pip 与virtualenv的不足

  • 自动创建virtualenv 环境, 以前要手机virtualenv .venv

  • 自动升级pip , 以前安装一些包,总提示升级pip,但升级了不久又要求升级.

  • 安装包后容易忘记添加包名到requirements.txt文件上.

  • pipenv shell 解决virtualenv .venv 然后再运行python.

  • pipenv run 同上面一样,不过运行其它命令, 如 pipenv run manage.py runserver

Loading Disqus comments...
Table of Contents