/rez:rez-pip-integrationfrom Rez Skills
Converts PyPI packages into rez packages using rez-pip. Covers install vs release modes, python version selection, pip resolution, and common conversion failures for Rez 3.4.0.
Ships in Rez Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub loonghao/rez-skills --plugin rezOne-sentence summary:
rez-piprunspip installinside a rezified python and converts the result — plus the dependencies it had to install — into rez packages, and it only goes one way: pip to rez, never rez to pip.
Skill scope: getting PyPI packages into rez. For authoring a package.py by hand see
rez-package-authoring; for the resolve that consumes the result see rez-resolve; for driving the
conversion from Python see rez-python-api.
Rez is language agnostic, but python is everywhere, so rez knows how to translate a pip package into a rez package. The conversion:
python-MAJOR.MINOR.It does not do the reverse. There is no rez-to-pip converter, and upstream documents a
rewrite of rez-pip as a plugin to address most of its current limitations.
This is the decision everything else follows from, so make it first and make it explicit:
rez-pip --install requests --python-version 3.11
--python-version names a rez python package version. rez resolves it, runs that
interpreter's pip, and the generated packages depend on python-3.11. Leave it out and you get the
latest python rez package, which is rarely what a studio wants.
If a package is not pure python — it ships a .so or a .pyd — it is built against one interpreter,
so run rez-pip once per python version you need. One conversion does not serve several pythons.
rez-pip --install foo # local_packages_path
rez-pip --install --release foo # release_packages_path
rez-pip --install --prefix /studio/packages/int foo
Check where those actually point before you predict where a package will land:
rez-config local_packages_path
rez-config release_packages_path
--install is required; rez-pip without it errors out with Expected one of: --install. That
is deliberate — a conversion you did not ask to persist should not write into a package repository.
pip is too tightly coupled to the interpreter it ships with for rez to treat it as a normal dependency, so rez-pip walks a fallback chain and prints what it picked:
python package named by --python-version (or the latest);pip package (backwards compatibility);Whichever it lands on, pip must be 19.0 or newer — that is a hard requirement.
Two consequences worth internalising:
--pip-version does not exist. It was removed, because a pip version decoupled from an
interpreter cannot be honoured.--with-ensurepip and upgrade it; python 3 already ships one, but check the version. Add wheel
and refresh setuptools while you are there.When installing into an interpreter by hand, make sure it lands in that interpreter:
/path/to/python -E -s -m pip install foo
-E ignores PYTHON* environment variables and -s takes your user site out of the equation.
| Flag | Effect |
|---|---|
--python-version VERSION | the rez python package to install with; becomes python-MAJOR.MINOR |
-i, --install | actually install (required) |
-r, --release | install into release_packages_path instead of local |
-p, --prefix PATH | install into a custom package repository path |
-e, --extra ... | pass the rest of the line through to pip install |
-v, --verbose | verbose mode, repeatable |
-e / --extra takes everything after it, so it must be last. Anything you put there replaces
rez's pre-configured pip arguments rather than adding to them.
rez-search foo
rez-env foo -o context.rxt
rez-context context.rxt --so
rez-search proves the packages exist in a repository on your search path; the rez-env /
rez-context pair proves they actually resolve and shows you which python came along. Do both —
a conversion that wrote a package nobody can resolve is the common failure, not the rare one.
from rez.pip import pip_install_package, InstallMode
installed, skipped = pip_install_package(
"foo",
python_version="3.11",
release=False,
prefix=None,
extra_args=None,
mode=InstallMode.min_deps,
)
It returns a 2-tuple of Variant lists: what was installed, and what was skipped because an
existing rez package already satisfied it. InstallMode has two members:
| Mode | Behaviour |
|---|---|
min_deps | install only the dependencies that must be installed — reuse an existing rez package when it satisfies one. The default, and what the CLI uses |
no_deps | install no dependencies. Fine for pure python; a package that must compile against a dependency will fail |
The signature also still carries pip_version, but the CLI no longer passes it and --pip-version
was removed — treat it as legacy.
| Symptom | Cause |
|---|---|
Expected one of: --install | --install is mandatory |
| Installed into the wrong repository | -i is local, -r is release, -p PATH overrides both |
| Package resolves on my machine only | it went to local_packages_path, which is per user |
| Import fails on another python | built against one interpreter; rerun per python version |
| pip is too old | pip must be >= 19.0; upgrade the pip inside the python package |
| Wrong wheel for the platform | rez-pip resolved a different python package than you think; pass --python-version |
| A dependency did not arrive | min_deps reuses an existing rez package when one satisfies it |
| Compile fails | the package needs a dependency rez did not install; try InstallMode.min_deps explicitly, or author the package by hand |
--python-version.rez-config local_packages_path and rez-config release_packages_path
before you convert.--install, adding --release or --prefix only when you mean it.rez-search and a real rez-env resolve — existence is not resolvability.-e for a one-off pip workaround; a conversion that needs custom pip flags is a
candidate for a hand-written package.py instead.16 skills in this plugin
/rez-cachingRez's two independent caches — the memcached-backed resolve cache and the on-disk package payload cache — the five settings that turn each one on, what invalidates an entry and what silently does not, rez-memcache and rez-pkg-cache for inspecting and flushing them, and the decision tree for 'I changed the package and nothing took effect'. Use when a resolve is slow, when a package change appears to be ignored, or when you need to prove a stale cache is or is not the cause. Covers Rez 3.4.0./rez-cliRez command-line reference — rez-env, rez-build, rez-release, rez-context, rez-search, rez-depends, rez-test, rez-config, rez-bind, rez-pip and the rest, with the flags that matter. Use when the user needs the right rez command or flag, or when running a build/release/test loop. Covers Rez 3.4.0./rez-config-pluginsRez configuration layering and the plugin system — config precedence and merge rules, string expansion, DelayLoad, key settings (packages_path, implicit_packages, caching, package_filter), and the seven plugin types with their discovery mechanisms and entry points. Use when the user asks how to configure rez, why a setting is not taking effect, or how to write or install a plugin. Covers Rez 3.4.0./rez-core-conceptsRez core concepts — packages, versions, requests, repositories, the package search path, implicit packages and variants. Use when the user asks what Rez is, how package versions or requests work, where Rez finds packages, why a resolve picked a certain version, or when a project contains package.py files. Covers Rez 3.4.0./rez-package-authoringRules and decision-making for authoring Rez packages — how to split versions and variants, how to write requires/variants/build_requires/commands, how wide to make dependency ranges, the rez-build and rez-release workflow and conventions, and the recurring pitfalls and anti-patterns. Use when writing, reviewing or restructuring a package.py, or when deciding whether a change needs a new version or a new variant. Covers Rez 3.4.0./rez-package-commandsWriting the Rez commands() section and rex environment API — env object, setenv/appendenv/prependenv/unsetenv/alias/source/error, string expansion, literal/expandable/expandvars, execution order and build-time branching. Use when a package must set, append or prepend environment variables, expose tools, source scripts, or behave differently during a build. Covers Rez 3.4.0.Other plugins' skills for the same job