django

2. pipenv 설치

으누아빠 2020. 7. 3. 17:30
반응형

pipenv

1. pipenv

  • django 공식 홈페이지 https://www.djangoproject.com/download/ 에서 장고를 설치하는 방법

    pip install Django==3.0.8
  • python 을 설치하면 pip가 따라옴

  • pip(Package Installer for Python)는 django를 전역으로 설치 시킴

  • 이 말의 뜻은 해당 서버에서는 더이상 다른 버전의 Django를 사용할수 없게 됨

  • 이를 방지하고자 나오는것이 pipenv

  • pipenv = npm + package.json

  • pipenv를 실행하면 .pipfile 를 생성함

2. pipenv 설치

pip install --user pipenv

3. pipenv 확인

PS D:\gongbang> pipenv
Usage: pipenv [OPTIONS] COMMAND [ARGS]...

Options:
  --where             Output project home information.
  --venv              Output virtualenv information.
  --py                Output Python interpreter information.
  --envs              Output Environment Variable options.
  --rm                Remove the virtualenv.
  --bare              Minimal output.
  --completion        Output completion (to be eval'd).
  --man               Display manpage.
  --support           Output diagnostic information for use in GitHub issues.
  --site-packages     Enable site-packages for the virtualenv.  [env var:
                      PIPENV_SITE_PACKAGES]
  --python TEXT       Specify which version of Python virtualenv should use.
  --three / --two     Use Python 3/2 when creating virtualenv.
  --clear             Clears caches (pipenv, pip, and pip-tools).  [env var:
                      PIPENV_CLEAR]
  -v, --verbose       Verbose mode.
  --pypi-mirror TEXT  Specify a PyPI mirror.
  --version           Show the version and exit.
  -h, --help          Show this message and exit.


Usage Examples:
   Create a new project using Python 3.7, specifically:
   $ pipenv --python 3.7

   Remove project virtualenv (inferred from current directory):
   $ pipenv --rm

   Install all dependencies for a project (including dev):
   $ pipenv install --dev

   Create a lockfile containing pre-releases:
   $ pipenv lock --pre

   Show a graph of your installed dependencies:
   $ pipenv graph

   Check your installed dependencies for security vulnerabilities:
   $ pipenv check

   Install a local setup.py into your virtual environment/Pipfile:
   $ pipenv install -e .

   Use a lower-level pip command:
   $ pipenv run pip freeze

Commands:
  check      Checks for security vulnerabilities and against PEP 508 markers
             provided in Pipfile.
  clean      Uninstalls all packages not specified in Pipfile.lock.
  graph      Displays currently-installed dependency graph information.
  install    Installs provided packages and adds them to Pipfile, or (if no
             packages are given), installs all packages from Pipfile.
  lock       Generates Pipfile.lock.
  open       View a given module in your editor.
  run        Spawns a command installed into the virtualenv.
  shell      Spawns a shell within the virtualenv.
  sync       Installs all packages specified in Pipfile.lock.
  uninstall  Un-installs a provided package and removes it from Pipfile.
  update     Runs lock, then sync.

'django' 카테고리의 다른 글

6. 국내 서비스를 위한 config/settings.py 수정  (2) 2020.07.09
5. creating a Django Project  (0) 2020.07.09
4. Github 저장소 생성  (0) 2020.07.07
3. 프로젝트 생성  (2) 2020.07.07
1. python 설치  (0) 2020.07.03