Skip to content

fix: correct dotenv dependency to python-dotenv in setup.py#833

Open
mango766 wants to merge 1 commit intoQwenLM:mainfrom
mango766:fix/setup-python-dotenv-dependency
Open

fix: correct dotenv dependency to python-dotenv in setup.py#833
mango766 wants to merge 1 commit intoQwenLM:mainfrom
mango766:fix/setup-python-dotenv-dependency

Conversation

@mango766
Copy link
Copy Markdown

Summary

  • Fix incorrect package name dotenvpython-dotenv in setup.py install_requires

Problem

setup.py lists 'dotenv' as a dependency, but the code uses:

from dotenv import load_dotenv  # qwen_agent/tools/mcp_manager.py:25

The dotenv and python-dotenv are different packages on PyPI:

Package PyPI Provides from dotenv import load_dotenv
python-dotenv link Yes (standard, 40M+ downloads/month)
dotenv link No (different API, <10K downloads/month)

Running pip install dotenv installs the wrong package, which does not provide load_dotenv.

Solution

Change 'dotenv' to 'python-dotenv' in install_requires.

Test Plan

  • pip install python-dotenv && python -c "from dotenv import load_dotenv; print('OK')"
  • pip install qwen-agent resolves correctly

The install_requires lists 'dotenv' but the code imports from the
'python-dotenv' package (from dotenv import load_dotenv). The 'dotenv'
package on PyPI is a different, much less popular package that does not
provide the same API.

Change to 'python-dotenv' which is the correct and widely-used package
that provides the dotenv module with load_dotenv().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant