Skip to content

Dependency Fixes #1241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,25 @@ If your login issues persist, please check the contents of the ~/.guardrailsrc f
If you're still encountering issues, please [open an issue](https://github.com/guardrails-ai/guardrails/issues/new) and we'll help you out!

We're also available on [Discord](https://discord.gg/U9RKkZSBgx) if you want to chat with us directly.

## I'm getting an error realted to distutils when installing validators.
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.

If you see an error similar to the one below:
```sh
Installing hub://guardrails/nsfw_text...
[ =] Running post-install setup
Device set to use cpu
/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.
warnings.warn(
/home/ubuntu/support/.venv/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
ERROR:guardrails-cli:Failed to import transformers.pipelines because of the following error (look up to see its traceback):
/home/ubuntu/.pyenv/versions/3.11.11/lib/python3.11/distutils/core.py
```

set the following as an environment variable to tell python to use the builtin version of distutils that exists in 3.11 and below:

```sh
export SETUPTOOLS_USE_DISTUTILS="stdlib"
```
49 changes: 2 additions & 47 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "guardrails-ai"
version = "0.6.3"
version = "0.6.4"
description = "Adding guardrails to large language models."
authors = ["Guardrails AI <contact@guardrailsai.com>"]
license = "Apache License 2.0"
Expand All @@ -20,7 +20,7 @@ lxml = "^4.9.3"
openai = "^1.30.1"
rich = "^13.6.0"
pydantic = ">=2.0.0, <3.0"
typer = {extras = ["all"], version = ">=0.9.0,<0.16"}
typer = {version = ">=0.9.0,<0.16"}
griffe = "^0.36.9"
tenacity = ">=8.1.0"
rstr = "^3.2.2"
Expand All @@ -42,7 +42,6 @@ pydash = "^7.0.6"
docspec_python = "2.2.1"
pydoc-markdown = "4.8.2"
langchain-core = ">=0.1,<0.4"
coloredlogs = "^15.0.1"
requests = "^2.31.0"
faker = "^25.2.0"
jsonref = "^1.1.0"
Expand Down