Skip to content

Commit 5fbac59

Browse files
authored
Merge pull request #1241 from guardrails-ai/dep-fix
Dependency Fixes
2 parents e6d5f42 + 77b709e commit 5fbac59

File tree

3 files changed

+26
-50
lines changed

3 files changed

+26
-50
lines changed

docs/faq.md

+22
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,25 @@ If your login issues persist, please check the contents of the ~/.guardrailsrc f
129129
If you're still encountering issues, please [open an issue](https://github.com/guardrails-ai/guardrails/issues/new) and we'll help you out!
130130

131131
We're also available on [Discord](https://discord.gg/U9RKkZSBgx) if you want to chat with us directly.
132+
133+
## I'm getting an error realted to distutils when installing validators.
134+
This can happen on cuda enabled devices in python versions 3.11 and below when a validator indirectly depends on a package that imports distutils.
135+
136+
If you see an error similar to the one below:
137+
```sh
138+
Installing hub://guardrails/nsfw_text...
139+
[ =] Running post-install setup
140+
Device set to use cpu
141+
/home/ubuntu/support/.venv/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
142+
warnings.warn(
143+
/home/ubuntu/support/.venv/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
144+
warnings.warn("Setuptools is replacing distutils.")
145+
ERROR:guardrails-cli:Failed to import transformers.pipelines because of the following error (look up to see its traceback):
146+
/home/ubuntu/.pyenv/versions/3.11.11/lib/python3.11/distutils/core.py
147+
```
148+
149+
set the following as an environment variable to tell python to use the builtin version of distutils that exists in 3.11 and below:
150+
151+
```sh
152+
export SETUPTOOLS_USE_DISTUTILS="stdlib"
153+
```

poetry.lock

+2-47
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "guardrails-ai"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
description = "Adding guardrails to large language models."
55
authors = ["Guardrails AI <[email protected]>"]
66
license = "Apache License 2.0"
@@ -20,7 +20,7 @@ lxml = "^4.9.3"
2020
openai = "^1.30.1"
2121
rich = "^13.6.0"
2222
pydantic = ">=2.0.0, <3.0"
23-
typer = {extras = ["all"], version = ">=0.9.0,<0.16"}
23+
typer = {version = ">=0.9.0,<0.16"}
2424
griffe = "^0.36.9"
2525
tenacity = ">=8.1.0"
2626
rstr = "^3.2.2"
@@ -42,7 +42,6 @@ pydash = "^7.0.6"
4242
docspec_python = "2.2.1"
4343
pydoc-markdown = "4.8.2"
4444
langchain-core = ">=0.1,<0.4"
45-
coloredlogs = "^15.0.1"
4645
requests = "^2.31.0"
4746
faker = "^25.2.0"
4847
jsonref = "^1.1.0"

0 commit comments

Comments
 (0)