dify - 💡(How to fix) Fix When installing the openai_api_compatible plugin in an intranet-only offline environment, an error occurs. [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35126Fetched 2026-04-14 05:56:35
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
1
Author
Timeline (top)
closed ×1commented ×1labeled ×1mentioned ×1

Error Message

When installing the openai_api_compatible plugin in an intranet-only offline environment, an error occurs. The offline package has already been built using dify-plugin-repackaging, and the installation works fine in a network-connected environment. failed to launch plugin: failed to install dependencies: failed to install dependencies: exit status 2, output: DEBUG uv 0.9.26 DEBUG Acquired shared lock for /root/.cache/uvDEBUG Found project root:/app/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd85b88820f2fd053d87db7DEBUG No workspace root found, using project root DEBUG Acquired exclusive lock for/app/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd...pp/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd85b88820f2fd053d87db7/.venv/.lockDEBUG Released lock at/root/.cache/uv/.lockerror: Request failed after 3 retries Caused by: Failed to fetch:https://pypi.org/simple/setuptools/` Caused by: error sending request for url (https://pypi.org/simple/setuptools/) Caused by: client error (Connect) Caused by: tcp connect error Caused by: Network is unreachable (os error 101) failed to init environment`

Root Cause

When installing the openai_api_compatible plugin in an intranet-only offline environment, an error occurs. The offline package has already been built using dify-plugin-repackaging, and the installation works fine in a network-connected environment. failed to launch plugin: failed to install dependencies: failed to install dependencies: exit status 2, output: DEBUG uv 0.9.26 DEBUG Acquired shared lock for /root/.cache/uvDEBUG Found project root:/app/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd85b88820f2fd053d87db7DEBUG No workspace root found, using project root DEBUG Acquired exclusive lock for/app/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd...pp/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd85b88820f2fd053d87db7/.venv/.lockDEBUG Released lock at/root/.cache/uv/.lockerror: Request failed after 3 retries Caused by: Failed to fetch:https://pypi.org/simple/setuptools/` Caused by: error sending request for url (https://pypi.org/simple/setuptools/) Caused by: client error (Connect) Caused by: tcp connect error Caused by: Network is unreachable (os error 101) failed to init environment`

RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.13.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When installing the openai_api_compatible plugin in an intranet-only offline environment, an error occurs. The offline package has already been built using dify-plugin-repackaging, and the installation works fine in a network-connected environment. failed to launch plugin: failed to install dependencies: failed to install dependencies: exit status 2, output: DEBUG uv 0.9.26 DEBUG Acquired shared lock for /root/.cache/uvDEBUG Found project root:/app/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd85b88820f2fd053d87db7DEBUG No workspace root found, using project root DEBUG Acquired exclusive lock for/app/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd...pp/storage/cwd/langgenius/openai_api_compatible-0.0.42@d61a157e6dda835866eff2891781d160e766739d5bd85b88820f2fd053d87db7/.venv/.lockDEBUG Released lock at/root/.cache/uv/.lockerror: Request failed after 3 retries Caused by: Failed to fetch:https://pypi.org/simple/setuptools/` Caused by: error sending request for url (https://pypi.org/simple/setuptools/) Caused by: client error (Connect) Caused by: tcp connect error Caused by: Network is unreachable (os error 101) failed to init environment`

✔️ Expected Behavior

Can be installed normally.

❌ Actual Behavior

No response

extent analysis

TL;DR

The issue is likely due to the inability to connect to the Python Package Index (PyPI) from an intranet-only offline environment, causing the installation of the openai_api_compatible plugin to fail.

Guidance

  • The error message indicates a "Network is unreachable" error when trying to fetch https://pypi.org/simple/setuptools/, suggesting that the offline environment does not have access to the internet.
  • To resolve this, you may need to configure your Docker environment to use a local package repository or mirror, or to allow temporary internet access for the installation process.
  • Verify that the offline package built using dify-plugin-repackaging includes all necessary dependencies, including setuptools, to avoid requiring internet access during installation.
  • Consider modifying the plugin installation process to handle offline environments, potentially by using a local package cache or pre-installing required dependencies.

Example

No code snippet is provided as the issue is related to environment configuration rather than code.

Notes

The solution may require modifications to the Docker configuration, the plugin installation process, or the offline package build process. The exact steps will depend on the specific requirements and constraints of the intranet-only offline environment.

Recommendation

Apply a workaround by configuring the Docker environment to use a local package repository or mirror, or by pre-installing required dependencies to avoid requiring internet access during installation. This approach is recommended as it allows for a more controlled and reliable installation process in an offline environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING