File per use archived windows error reporting là gì
pip also supports installing from “requirements files”, which provide an easy way to specify a whole environment to be installed. Show
Overviewpip install has several stages:
Note that C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar 4 prefers to leave the installed version as-is unless C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar 5 is specified. Argument HandlingWhen looking at the items to be installed, pip checks what type of item each is, in the following order:
Each item identified is added to the set of requirements to be satisfied by the install. Working Out the Name and VersionFor each candidate item, pip needs to know the project name and version. For wheels (identified by the C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar 7 file extension) this can be obtained from the filename, as per the Wheel spec. For local directories, or explicitly specified sdist files, the C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar 8 command is used to determine the project metadata. For sdists located via an index, the filename is parsed for the name and project version (this is in theory slightly less reliable than using the C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar 9 command, but avoids downloading and processing unnecessary numbers of files). Any URL may use the python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 0 syntax (see VCS Support) to explicitly state the project name. Satisfying RequirementsOnce pip has the set of requirements to satisfy, it chooses which version of each requirement to install using the simple rule that the latest version that satisfies the given constraints will be installed (but see for an exception regarding pre-release versions). Where more than one source of the chosen version is available, it is assumed that any source is acceptable (as otherwise the versions would differ). Obtaining information about what was installedThe install command has a python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 1 option that will generate a JSON report of what pip has installed. In combination with the python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 2 and python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 3 it can be used to resolve a set of requirements without actually installing them. The report can be written to a file, or to standard output (using python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 4 in combination with python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 5). The format of the JSON report is described in Installation Report. Installation OrderNote This section is only about installation order of runtime dependencies, and does not apply to build dependencies (those are specified using PEP 518). As of v6.1.0, pip installs dependencies before their dependents, i.e. in “topological order.” This is the only commitment pip currently makes related to order. While it may be coincidentally true that pip will install things in the order of the install arguments or in the order of the items in a requirements file, this is not a promise. In the event of a dependency cycle (aka “circular dependency”), the current implementation (which might possibly change later) has it such that the first encountered member of the cycle is installed last. For instance, if quux depends on foo which depends on bar which depends on baz, which depends on foo: Unix/macOS $ python -m pip install quux ... Installing collected packages baz, bar, foo, quux $ python -m pip install bar ... Installing collected packages foo, baz, bar Windows C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar Prior to v6.1.0, pip made no commitments about install order. The decision to install topologically is based on the principle that installations should proceed in a way that leaves the environment usable at each step. This has two main practical benefits:
Although the new install order is not intended to replace (and does not replace) the use of python -m pip install SomePackage # latest version python -m pip install 'SomePackage==1.0.4' # specific version python -m pip install 'SomePackage>=1.0.4' # minimum version 6 to declare build dependencies, it may help certain projects install from sdist (that might previously fail) that fit the following profile:
Requirements File Format This section has been moved to Requirements File Format. Requirement Specifiers This section has been moved to Requirement Specifiers. Per-requirement Overrides This is now covered in Requirements File Format. Pre-release VersionsStarting with v1.4, pip will only install stable versions as specified by by default. If a version cannot be parsed as a compliant PEP 440 version then it is assumed to be a pre-release. If a Requirement specifier includes a pre-release or development version (e.g. py -m pip install SomePackage # latest version py -m pip install "SomePackage==1.0.4" # specific version py -m pip install "SomePackage>=1.0.4" # minimum version
The C:\> py -m pip install quux ... Installing collected packages baz, bar, foo, quux C:\> py -m pip install bar ... Installing collected packages foo, baz, bar 4 command also supports a flag that enables installation of pre-releases and development releases. VCS Support This is now covered in VCS Support. Finding Packagespip searches for packages on PyPI using the HTTP simple interface, which is documented here and there. pip offers a number of package index options for modifying how packages are found. pip looks for packages in a number of places: on PyPI (if not disabled via py -m pip install SomePackage # latest version py -m pip install "SomePackage==1.0.4" # specific version py -m pip install "SomePackage>=1.0.4" # minimum version 2), in the local filesystem, and in any additional repositories specified via py -m pip install SomePackage # latest version py -m pip install "SomePackage==1.0.4" # specific version py -m pip install "SomePackage>=1.0.4" # minimum version 3 or py -m pip install SomePackage # latest version py -m pip install "SomePackage==1.0.4" # specific version py -m pip install "SomePackage>=1.0.4" # minimum version 4. There is no ordering in the locations that are searched. Rather they are all checked, and the “best” match for the requirements (in terms of version number - see PEP 440 for details) is selected. See the . SSL Certificate Verification This is now covered in HTTPS Certificates. Caching This is now covered in Caching. Wheel Cache This is now covered in Caching. Hash checking mode This is now covered in Secure installs. Local Project Installs This is now covered in Local project installs. Editable installs This is now covered in Local project installs. Build System Interface This is now covered in Build System Interface. Options-r, --requirement Install from the given requirements file. This option can be used multiple times. -c, --constraint 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 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 Install packages into --platform Only use wheels compatible with --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 Only use wheels compatible with Python implementation --abi Only use wheels compatible with Python abi --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 Install everything relative to this alternate root directory. --prefix Installation prefix where lib, bin and other top-level folders are placed. Note that the resulting installation may contain scripts and other resources which reference the Python interpreter of pip, and not that of py -m pip install SomePackage # latest version py -m pip install "SomePackage==1.0.4" # specific version py -m pip install "SomePackage>=1.0.4" # minimum version 5. See also the py -m pip install SomePackage # latest version py -m pip install "SomePackage==1.0.4" # specific version py -m pip install "SomePackage>=1.0.4" # minimum version 6 option if the intention is to install packages into another (possibly pip-free) environment. --src Directory to check out editable projects into. The default in a virtualenv is “ -U, --upgrade Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used. --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 -C, --config-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. --global-option 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 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 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 binary packages over source packages, even if the source packages are newer. --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 Specify whether the progress bar should be used [on, off] (default: on) --root-user-action Action if pip is run as a root user. By default, a warning message is shown. --report 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. -i, --index-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 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 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. Examples
Find pre-release and development versions, in addition to stable versions. By default, pip only finds stable versions. Chức năng Disk Cleanup là gì thực hiện như thế nào?Disk Clean-up ( cleanmgr.exe ) là một tiện ích bảo trì máy tính có trong Microsoft Windows được thiết kế để giải phóng không gian đĩa trên ổ cứng của máy tính. Disk Cleanup có ảnh hưởng gì không?Xóa tệp này có thể giải phóng tới vài GB, nhưng cũng có thể gây ra sự cố cho máy tính. Tính năng Disk Cleanup của Windows hỗ trợ người dùng nhanh chóng xóa các tệp hệ thống không còn cần thiết, giải phóng dung lượng ổ cứng. Đối với hầu hết các tệp, Disk Cleanup có thể xóa mà không ảnh hưởng gì đến máy. Delivery Optimization file là gì?Delivery Optimization Files là một tệp bổ sung trên máy tính, có tác dụng hỗ trợ nên bạn hoàn toàn có thể xóa nếu bạn thấy nó không cần thiết hoặc cảm thấy bị chiếm quá nhiều dung lượng. Thông thường Delivery Optimization Files trong Windows 10 sẽ tự động xóa bộ nhớ cache của nó. Disk Cleanup Windows 11 ở đâu?Nhấn vào nút Start trên thanh Taskbar và nhập “Disk Cleanup”. Sau đó, bạn hãy chọn mở ứng dụng Disk Cleanup trong danh sách các kết quả mà Windows trả về. Bước 2. Trong cửa sổ chọn ổ cứng cần dọn dẹp, bạn hãy chọn ổ C và nhấn Enter. |