mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
Fix #2409: Pin setuptools version to fix packaging.licenses dependency issue
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -152,6 +152,11 @@ If you encounter issues during installation or usage, here are some common solut
|
||||
- Try upgrading pip: `pip install --upgrade pip`
|
||||
- If issues persist, use a pre-built wheel: `pip install tiktoken --prefer-binary`
|
||||
|
||||
3. **ModuleNotFoundError: No module named 'packaging.licenses'**
|
||||
- This error occurs when installing with `uv` due to newer setuptools versions
|
||||
- Fix by downgrading setuptools: `pip install setuptools<=65.5.0`
|
||||
- Then install CrewAI: `uv pip install crewai`
|
||||
|
||||
### 2. Setting Up Your Crew with the YAML Configuration
|
||||
|
||||
To create a new CrewAI project, run the following CLI (Command Line Interface) command:
|
||||
|
||||
@@ -96,5 +96,5 @@ exclude = ["cli/templates"]
|
||||
exclude_dirs = ["src/crewai/cli/templates"]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
requires = ["hatchling", "setuptools<=65.5.0"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
41
tests/installation/test_dependency_compatibility.py
Normal file
41
tests/installation/test_dependency_compatibility.py
Normal file
@@ -0,0 +1,41 @@
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import pytest
|
||||
import shutil
|
||||
|
||||
|
||||
def test_pypika_installation():
|
||||
"""Test that pypika can be installed without packaging.licenses errors."""
|
||||
# Check if uv is available
|
||||
uv_path = shutil.which("uv")
|
||||
if not uv_path:
|
||||
pytest.skip("UV not available, skipping test")
|
||||
|
||||
# Install pypika using uv
|
||||
result = subprocess.run(
|
||||
["uv", "pip", "install", "pypika==0.48.9", "--no-deps"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0, f"Failed to install pypika: {result.stderr}"
|
||||
|
||||
|
||||
def test_chromadb_installation():
|
||||
"""Test that chromadb can be installed without packaging.licenses errors."""
|
||||
# Skip this test if running in CI/CD to avoid long test times
|
||||
if "CI" in os.environ:
|
||||
pytest.skip("Skipping in CI environment")
|
||||
|
||||
# Check if uv is available
|
||||
uv_path = shutil.which("uv")
|
||||
if not uv_path:
|
||||
pytest.skip("UV not available, skipping test")
|
||||
|
||||
# Install chromadb using uv
|
||||
result = subprocess.run(
|
||||
["uv", "pip", "install", "chromadb>=0.5.23", "--no-deps"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0, f"Failed to install chromadb: {result.stderr}"
|
||||
Reference in New Issue
Block a user