매번 pip 설치옵션 찾아보기 귀찮아서 정리함.
아래 명령어로 찾아볼 수 있다.
pip install -h
혹은 공식문서 참고
https://pip.pypa.io/en/stable/cli/pip_install/
pip install - pip documentation v23.1.2
py -m pip install --upgrade SomePackage Note This will guarantee an update to SomePackage as it is a direct requirement, and possibly upgrade dependencies if their installed versions do not meet the minimum requirements of SomePackage. Any non-requisite up
pip.pypa.io
Usage:
/opt/homebrew/Caskroom/miniconda/base/envs/yeardream/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
/opt/homebrew/Caskroom/miniconda/base/envs/yeardream/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
/opt/homebrew/Caskroom/miniconda/base/envs/yeardream/bin/python -m pip install [options] [-e] <vcs project url> ...
/opt/homebrew/Caskroom/miniconda/base/envs/yeardream/bin/python -m pip install [options] [-e] <local project path> ...
/opt/homebrew/Caskroom/miniconda/base/envs/yeardream/bin/python -m pip install [options] <archive url/path> ...
Description:
Install packages from:
- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.
pip also supports installing from "requirements files", which provide
an easy way to specify a whole environment to be installed.
Install Options:
-r, --requirement <file> Install from the given requirements file. This
option can be used multiple times.
-c, --constraint <file> Constrain versions using the given constraints
file. This option can be used multiple times.
--no-deps Don't install package dependencies.
--pre Include pre-release and development versions. By
default, pip only finds stable versions.
-e, --editable <path/url> Install a project in editable mode (i.e.
setuptools "develop mode") from a local project
path or a VCS url.
--dry-run Don't actually install anything, just print what
would be. Can be used in combination with
--ignore-installed to 'resolve' the
requirements.
-t, --target <dir> Install packages into <dir>. By default this
will not replace existing files/folders in
<dir>. Use --upgrade to replace existing
packages in <dir> with new versions.
--platform <platform> Only use wheels compatible with <platform>.
Defaults to the platform of the running system.
Use this option multiple times to specify
multiple platforms supported by the target
interpreter.
--python-version <python_version>
The Python interpreter version to use for wheel
and "Requires-Python" compatibility checks.
Defaults to a version derived from the running
interpreter. The version can be specified using
up to three dot-separated integers (e.g. "3" for
3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-
minor version can also be given as a string
without dots (e.g. "37" for 3.7.0).
--implementation <implementation>
Only use wheels compatible with Python
implementation <implementation>, e.g. 'pp',
'jy', 'cp', or 'ip'. If not specified, then the
current interpreter implementation is used. Use
'py' to force implementation-agnostic wheels.
--abi <abi> Only use wheels compatible with Python abi
<abi>, e.g. 'pypy_41'. If not specified, then
the current interpreter abi tag is used. Use
this option multiple times to specify multiple
abis supported by the target interpreter.
Generally you will need to specify
--implementation, --platform, and --python-
version when using this option.
--user Install to the Python user install directory for
your platform. Typically ~/.local/, or
%APPDATA%\Python on Windows. (See the Python
documentation for site.USER_BASE for full
details.)
--root <dir> Install everything relative to this alternate
root directory.
--prefix <dir> Installation prefix where lib, bin and other
top-level folders are placed
--src <dir> Directory to check out editable projects into.
The default in a virtualenv is "<venv
path>/src". The default for global installs is
"<current dir>/src".
-U, --upgrade Upgrade all specified packages to the newest
available version. The handling of dependencies
depends on the upgrade-strategy used.
--upgrade-strategy <upgrade_strategy>
Determines how dependency upgrading should be
handled [default: only-if-needed]. "eager" -
dependencies are upgraded regardless of whether
the currently installed version satisfies the
requirements of the upgraded package(s). "only-
if-needed" - are upgraded only when they do not
satisfy the requirements of the upgraded
package(s).
--force-reinstall Reinstall all packages even if they are already
up-to-date.
-I, --ignore-installed Ignore the installed packages, overwriting them.
This can break your system if the existing
package is of a different version or was
installed with a different package manager!
--ignore-requires-python Ignore the Requires-Python information.
--no-build-isolation Disable isolation when building a modern source
distribution. Build dependencies specified by
PEP 518 must be already installed if this option
is used.
--use-pep517 Use PEP 517 for building source distributions
(use --no-use-pep517 to force legacy behaviour).
--check-build-dependencies Check the build dependencies when PEP517 is
used.
--break-system-packages Allow pip to modify an EXTERNALLY-MANAGED Python
installation
--config-settings <settings>
Configuration settings to be passed to the PEP
517 build backend. Settings take the form
KEY=VALUE. Use multiple --config-settings
options to pass multiple keys to the backend.
--install-option <options> This option is deprecated. Using this option
with location-changing options may cause
unexpected behavior. Use pip-level options like
--user, --prefix, --root, and --target.
--global-option <options> Extra global options to be supplied to the
setup.py call before the install or bdist_wheel
command.
--compile Compile Python source files to bytecode
--no-compile Do not compile Python source files to bytecode
--no-warn-script-location Do not warn when installing scripts outside PATH
--no-warn-conflicts Do not warn about broken dependencies
--no-binary <format_control>
Do not use binary packages. Can be supplied
multiple times, and each time adds to the
existing value. Accepts either ":all:" to
disable all binary packages, ":none:" to empty
the set (notice the colons), or one or more
package names with commas between them (no
colons). Note that some packages are tricky to
compile and may fail to install when this option
is used on them.
--only-binary <format_control>
Do not use source packages. Can be supplied
multiple times, and each time adds to the
existing value. Accepts either ":all:" to
disable all source packages, ":none:" to empty
the set, or one or more package names with
commas between them. Packages without binary
distributions will fail to install when this
option is used on them.
--prefer-binary Prefer older binary packages over newer source
packages.
--require-hashes Require a hash to check each requirement
against, for repeatable installs. This option is
implied when any package in a requirements file
has a --hash option.
--progress-bar <progress_bar>
Specify whether the progress bar should be used
[on, off] (default: on)
--root-user-action <root_user_action>
Action if pip is run as a root user. By default,
a warning message is shown.
--report <file> Generate a JSON file describing what pip did to
install the provided requirements. Can be used
in combination with --dry-run and --ignore-
installed to 'resolve' the requirements. When -
is used as file name it writes to stdout. When
writing to stdout, please combine with the
--quiet option to avoid mixing pip logging
output with JSON output.
--no-clean Don't clean up build directories.
Package Index Options:
-i, --index-url <url> Base URL of the Python Package Index (default
https://pypi.org/simple). This should point to a
repository compliant with PEP 503 (the simple
repository API) or a local directory laid out in
the same format.
--extra-index-url <url> Extra URLs of package indexes to use in addition
to --index-url. Should follow the same rules as
--index-url.
--no-index Ignore package index (only looking at --find-
links URLs instead).
-f, --find-links <url> If a URL or path to an html file, then parse for
links to archives such as sdist (.tar.gz) or
wheel (.whl) files. If a local path or file://
URL that's a directory, then look for archives
in the directory listing. Links to VCS project
URLs are not supported.
General Options:
-h, --help Show help.
--debug Let unhandled exceptions propagate outside the
main subroutine, instead of logging them to
stderr.
--isolated Run pip in an isolated mode, ignoring
environment variables and user configuration.
--require-virtualenv Allow pip to only run in a virtual environment;
exit with an error otherwise.
--python <python> Run pip with the specified Python interpreter.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be
used up to 3 times (corresponding to WARNING,
ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--no-input Disable prompting for input.
--proxy <proxy> Specify a proxy in the form
scheme://[user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should
attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <hostname> Mark this host or host:port pair as trusted,
even though it does not have valid or any HTTPS.
--cert <path> Path to PEM-encoded CA certificate bundle. If
provided, overrides the default. See 'SSL
Certificate Verification' in pip documentation
for more information.
--client-cert <path> Path to SSL client certificate, a single file
containing the private key and the certificate
in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
--no-color Suppress colored output.
--no-python-version-warning
Silence deprecation warnings for upcoming
unsupported Pythons.
--use-feature <feature> Enable new functionality, that may be backward
incompatible.
--use-deprecated <feature> Enable deprecated functionality, that will be
removed in the future.
Note: you may need to restart the kernel to use updated packages.
아래는 번역본 (DeepL 사용함)
사용법:
/opt/homebrew/Caskroom/miniconda/base/envs/x/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
/opt/homebrew/Caskroom/miniconda/base/envs/x/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
/opt/homebrew/Caskroom/miniconda/base/envs/x/bin/python -m pip install [options] [-e] <vcs project url> ...
/opt/homebrew/Caskroom/miniconda/base/envs/x/bin/python -m pip install [options] [-e] <local project path> ...
/opt/homebrew/Caskroom/miniconda/base/envs/x/bin/python -m pip install [options] <archive url/path> ...
설명:
다음에서 패키지를 설치합니다:
- PyPI(및 기타 인덱스)에서 요구 사항 지정자를 사용하여 패키지를 설치합니다.
- VCS 프로젝트 URL.
- 로컬 프로젝트 디렉터리.
- 로컬 또는 원격 소스 아카이브.
pip는 또한 "requirements files"에서 설치하는 것을 지원합니다.
설치될 전체 환경을 쉽게 지정할 수 있는 방법을 제공합니다.
설치 옵션:
-r, --requirement <file> 지정된 요구 사항 파일에서 설치합니다.
이 옵션은 여러 번 사용할 수 있습니다.
-c, --constraint <file> 지정된 제약 조건을 사용하여 버전을 제한합니다.
파일을 사용하여 버전을 제한합니다. 이 옵션은 여러 번 사용할 수 있습니다.
--no-deps 패키지 종속성을 설치하지 않습니다.
--pre 사전 릴리스 및 개발 버전을 포함합니다.
기본적으로 pip는 안정적인 버전만 찾습니다.
-e, --editable <path/URL> 로컬 프로젝트에서 편집 모드(예 setuptools "develop mode")에서
로컬 프로젝트의 경로 또는 VCS URL을 입력합니다.
--dry-run 실제로는 아무것도 설치하지 않고 필요한 것을 인쇄합니다.
요구 사항을 'resolve'하기 위해 --ignore-installed 와 함께 사용할 수 있습니다.
-t, --target <dir> 패키지를 <dir>에 설치합니다. 기본적으로 이는 기존 파일/폴더를 대체하지 않습니다.
<dir>. <dir>의 기존 패키지를 새 버전으로 바꾸려면 --upgrade를 사용합니다.
패키지를 새 버전으로 바꾸려면 --upgrade를 사용합니다.
--platform <platform> <platform>과 호환되는 휠만 사용합니다.
기본값은 실행 중인 시스템의 플랫폼입니다.
이 옵션을 여러 번 사용하면 대상에서 지원하는 여러 플랫폼 인터프리터가
지원하는 여러 플랫폼을 지정합니다.
--python-version <python_version>
휠에 사용할 파이썬 인터프리터 버전
및 "Requires-Python" 호환성 검사에 사용할 파이썬 인터프리터 버전.
기본값은 실행 중인 인터프리터에서 파생된 버전입니다.
인터프리터에서 파생된 버전입니다. 버전은 다음을 사용하여 지정할 수 있습니다.
점으로 구분된 정수를 최대 3개까지 지정할 수 있습니다(예: "3"의 경우
3.0.0의 경우 "3", 3.7.0의 경우 "3.7" 또는 "3.7.3"). 메이저
부 버전을 점 없이 문자열로 지정할 수도 있습니다.
문자열로 지정할 수도 있습니다(예: 3.7.0의 경우 "37").
--implementation <implementation>
파이썬과 implementation <implementation>호환되는 휠만 사용하십시오.
예: 'pp','jy', 'cp' 또는 'ip'. 지정하지 않으면 현재 인터프리터 구현이 사용됩니다
'py'를 사용하면 구현에 구애받지 않는 휠을 강제로 사용합니다.
--abi <abi> 파이썬 abi와 호환되는 휠만 사용합니다.
<abi>(예: 'pypy_41'). 지정하지 않으면
현재 인터프리터 abi 태그가 사용됩니다. 사용
이 옵션을 여러 번 사용하면 대상 인터프리터가 지원하는 여러
abi를 여러 개 지정하려면 이 옵션을 여러 번 사용합니다.
Generally you will need to specify --implementation, --platform, and --python- version
when using this option.
--user 플랫폼에 대한 파이썬 사용자 설치 디렉터리에 설치하려면
플랫폼에 설치합니다. 일반적으로 ~/.local/, 또는
Windows의 경우 %APPDATA%\Python.
See the Python documentation for site.USER_BASE for full details.
자세한 내용은 파이썬 문서를 참조하세요.)
--root <dir> 이 대체 루트 디렉터리를 기준으로 모든 것을 설치합니다.
--prefix <dir> lib, bin 및 기타 최상위 폴더가 위치하는 설치 접두사
--src <dir> 편집 가능한 프로젝트를 체크 아웃할 디렉터리.
가상 환경의 기본값은 "<venvpath>/src"입니다.
전역 설치의 기본값은 "<current dir>/src"입니다.
-U, --upgrade 지정된 모든 패키지를 사용 가능한 최신 버전으로 업그레이드합니다.
종속성 처리는 사용된 업그레이드 전략에 따라 다릅니다.
--upgrade-strategy <upgrade_strategy>
종속성 업그레이드를 어떻게 처리할지 결정합니다.
처리할 방법을 결정합니다 [기본값: only-if-needed].
"eager" - 현재 설치된 버전이 업그레이드된 패키지의
요구 사항을 충족하는지 여부와 관계없이 종속성을 업그레이드합니다.
"only-if-needed" -
업그레이드된 패키지의 요구 사항을 충족하지 않는 경우에만 패키지를 업그레이드합니다.
--force-reinstall 모든 패키지가 이미 최신 상태이더라도 다시 설치합니다.
-I, --ignore-installed 설치된 패키지를 무시하고 덮어씁니다.
기존 패키지가 다른 버전이거나
다른 패키지 관리자로 설치한 경우 시스템을 손상시킬 수 있습니다!
--ignore-requires-python Requires-Python 정보를 무시합니다.
--no-build-isolation 최신 소스 배포를 빌드할 때 격리 기능을 비활성화합니다.
이 옵션을 사용하는 경우 PEP 518에 지정된 빌드 종속성이 이미 설치되어 있어야 합니다.
--use-pep517 소스 배포를 빌드할 때 PEP 517을 사용한다.
(레거시 동작을 강제하려면 --no-use-pep517 사용).
--check-build-dependencies PEP517이 사용될 때 빌드 종속성을 확인합니다.
--break-system-packages pip가 외부에서 관리되는 파이썬 설치를 수정할 수 있도록 허용합니다.
--config-settings <settings>
PEP에 전달할 구성 설정
517 빌드 백엔드로 전달한다. 설정은 KEY=VALUE 형식을 취합니다.
--config-settings 옵션을 사용하여 여러 키를 백엔드에 전달할 수 있습니다.
--install-option <options> 이 옵션은 더 이상 사용되지 않습니다. 이 옵션을 위치 변경 옵션과 함께 사용하면
예기치 않은 동작이 발생할 수 있습니다.
다음과 같은 pip-level 옵션을 사용하세요.
--user, --prefix, --root 및 --target.
--global-option <options> 설치 또는 bdist_wheel 명령 전에 setup.py 호출에 제공할 추가 전역 옵션입니다.
--compile 파이썬 소스 파일을 바이트코드로 컴파일합니다.
--no-compile 파이썬 소스 파일을 바이트코드로 컴파일하지 않음
--no-warn-script-location PATH 외부에 스크립트를 설치할 때 경고하지 않음
--no-warn-conflicts 깨진 종속성(dependencies)에 대해 경고하지 않음
--no-binary <format_control>
바이너리 패키지를 사용하지 않는다.
여러 번 입력할 수 있으며, 입력할 때마다 기존 값에 추가됩니다.
모든 바이너리 패키지를 사용하지 않으려면 ":all:"
집합을 비우려면 ":none:(콜론에 주의)
또는 하나 이상의 패키지 이름 사이에 쉼표가 있는 패키지 이름(콜론 없음)을 사용할 수 있습니다.
일부 패키지는 컴파일이 까다롭기 때문에 이 옵션을 사용하면 설치에 실패할 수 있습니다.
--only-binary <format_control>
소스 패키지를 사용하지 않습니다.
여러 번 입력할 수 있으며, 입력할 때마다 기존 값에 추가됩니다.
모든 소스 패키지를 비활성화하려면 ":all:"
세트를 비우려면 ":none:
바이너리 배포판이 없는 패키지는 이 옵션을 사용하면 설치에 실패합니다.
--prefer-binary 최신 소스 패키지보다 오래된 바이너리 패키지를 선호합니다.
--require-hashes 반복 설치를 위해 각 요구 사항을 확인할 해시를 요구합니다.
이 옵션은 요구 사항 파일의 패키지에 --hash 옵션이 있는 경우 암시됩니다.
--progress-bar <progress_bar>
진행률 표시줄을 사용할지 여부를 지정합니다.
[on, off] (default: on)
--root-user-action <root_user_action>
pip가 root 사용자로 실행되는 경우의 동작. 기본적으로
경고 메시지가 표시됩니다.
--report <file> 제공된 요구 사항을 설치하기 위해 pip가 수행한 작업을 설명하는 JSON 파일을 생성합니다.
수행한 작업을 설명하는 JSON 파일을 생성합니다. 사용 가능
--dry-run 및 --ignore-와 함께 사용 가능
와 함께 사용하여 요구 사항을 'resolve'할 수 있습니다. When -
을 파일 이름으로 사용하면 stdout에 기록합니다. When
을 사용하는 경우, pip 로깅이 섞이지 않도록 하려면
--quiet 옵션과 결합하여 pip 로깅과
출력과 JSON 출력이 섞이지 않도록 --quiet 옵션과 함께 사용하세요.
--no-clean 빌드 디렉터리를 정리하지 않는다.
패키지 색인 옵션:
-i, --index-url <url> 파이썬 패키지 인덱스의 기본 URL(기본값
https://pypi.org/simple). 이것은 PEP 503을 준수하는
PEP 503을 준수하는 repository(간단한
repository API)를 준수하는 repository 또는 동일한 형식의
같은 형식으로 배치된 로컬 디렉터리를 가리켜야 합니다.
--extra-index-url <url> 추가로 사용할 패키지 인덱스의 추가 URL.
추가할 패키지 인덱스의 추가 URL. 다음과 같은 규칙을 따라야 한다.
--index-url.
--no-index 패키지 인덱스 무시 (only looking at --find-
links URLs instead).
-f, --find-links <url> URL 또는 html 파일의 경로인 경우, 다음을 구문 분석합니다.
아카이브에 대한 링크를 구문 분석합니다(예: sdist(.tar.gz) 또는
wheel(.whl) 파일과 같은 아카이브 링크를 구문 분석합니다. 로컬 경로 또는 file://
URL이 디렉토리인 경우 디렉토리 목록에서 아카이브(
를 찾습니다. VCS 프로젝트 링크
URL은 지원되지 않습니다.
일반 옵션:
-h, --help 도움말을 표시합니다.
--debug 처리되지 않은 예외가 main subroutine 외부로 전파되도록 합니다.
stderr.
--isolated 환경 변수와 사용자 구성을 무시하고 isolated mode로 pip를 실행합니다.
환경 변수와 사용자 구성을 무시하고 격리 모드로 실행합니다.
--require-virtualenv pip가 가상 환경에서만 실행되도록 허용합니다;
그렇지 않으면 오류와 함께 종료합니다.
--python <python> 지정된 파이썬 인터프리터로 pip를 실행합니다.
-v, --verbose 더 많은 출력을 제공합니다. 옵션은 추가적이며
최대 3번까지 사용할 수 있습니다.
-v, --version 버전을 표시하고 종료합니다.
-q, --quiet 출력을 줄입니다. 옵션은 추가적이며
최대 3회까지 사용할 수 있습니다(WARNING,
ERROR, CRITICAL 로깅 수준에 해당).
--log <경로> 자세한 내용을 추가하는 로그의 경로입니다.
--no-input 입력 메시지를 표시하지 않습니다.
--proxy <프록시> 다음과 같은 형식으로 프록시를 지정합니다.
scheme://[user:passwd@]proxy.server:port.
--retries <재시도> 각 연결이 시도할 수 있는 최대 재시도 횟수입니다.
시도합니다(기본값은 5회).
--timeout <초> 소켓 시간 제한을 설정합니다(기본값 15초).
--exists-action <action> 경로가 이미 존재할 때 기본 동작:
(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <호스트명> 이 호스트 또는 호스트:포트 쌍을 신뢰할 수 있는 것으로 표시합니다,
even though it does not have valid or any HTTPS
--cert <경로> PEM 인코딩된 CA 인증서 번들의 경로입니다. 만약
를 제공하면 기본값을 재정의합니다. pip 문서의 'SSL
Certificate Verification'을 참조하세요.
--client-cert <path> SSL 클라이언트 인증서의 경로, PEM format 개인 키와 인증서를 포함하는 단일 파일
개인 키와 인증서를 포함하는 단일 파일
--cache-dir <dir> 캐시 데이터를 <dir>에 저장합니다.
--no-cache-dir 캐시를 사용하지 않습니다.
--disable-pip-version-check
PyPI를 주기적으로 확인하여 새 버전의 pip를 사용할 수 있는지 여부를
새 버전의 pip를 다운로드할 수 있는지
다운로드할 수 있는지 주기적으로 확인하지 않습니다. Implied with --no-index.
--no-color 컬러 출력을 억제합니다.
--no-python-version-warning
곧 지원되지 않는 파이썬에 대한 지원 중단 경고를 숨깁니다.
--use-feature <feature> 이전 버전과 호환되지 않을 수 있는 새로운 기능을 활성화합니다.
호환되지 않을 수 있는 새로운 기능을 활성화합니다.
--use-deprecated <feature> 향후 제거될 사용 중단된 기능을 활성화합니다.
참고: 업데이트된 패키지를 사용하려면 커널을 다시 시작해야 할 수 있습니다.
Translated with www.DeepL.com/Translator (free version)
'Dev > Any' 카테고리의 다른 글
GPT-3.5-turbo 에러 코드 429 - You exceeded your current quota, please check your plan and billing details. (8) | 2024.03.14 |
---|---|
conda install -c conda-forge 명령어는 뭘까 (0) | 2023.03.20 |
변수 개념 학습 및 정리 (0) | 2022.11.09 |
JDK 이클립스 설치 방법 및 초기 셋팅 (0) | 2022.11.07 |
unmappable character (0xED) for encoding x-windows-949 자바 javac 컴파일 에러 (0) | 2022.11.07 |