Version 1.4.1 cannot install the OpenAI-API-compatible plug-in in the offline environment #14295

Closed
opened 2026-02-21 19:16:33 -05:00 by yindo · 4 comments
Owner

Originally created by @D-S-William-Guo on GitHub (May 29, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Referenced this before, but still can't solve it. #20324
Firstly, I pulled all the images on my personal computer using docker compose, and then uploaded the GitHub source code and images to an isolated offline environment.
Then, following the official Docs, I started the dify 1.4.1 project using docker compose. I downloaded the offline plugin package (e.g., langgenius-openai_api_compatible_0.0.16.difypkg) from my personal computer and transferred it to the offline environment for installation. The PIP_MIRROR_URL has been configured in the .env file. An error occurred during the plugin installation as follows:

2025/05/29 01:26:42 full_duplex.go:27: [INFO]new plugin logged in: langgenius/openai_api_compatible:0.0.16
2025/05/29 01:26:42 full_duplex.go:59: [INFO]init environment for plugin langgenius/openai_api_compatible:0.0.16
[GIN] 2025/05/29 - 01:26:42 | 200 |   668.281µs |    172.23.0.8 | GET      "/plugin/13693afc-ae8f-4a34-8f33-3b30af3b7b5e/management/install/tasks/abdcc036-588f-4cf9-982e-de2e70e5af51"
[GIN] 2025/05/29 - 01:26:42 | 200 |   1.020106ms |    172.23.0.8 | GET      "/plugin/13693afc-ae8f-4a34-8f33-3b30af3b7b5e/management/install/tasks?page=1&page_size=100"
2025/05/29 01:26:43 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: exit status 1, output: × No solution found when resolving dependencies:
→ Because only requests<=2.31.0 is available and all of:
dify-plugin>=0.2.0,<=0.2.2
dify-plugin==0.2.4
depend on requests>=2.32.3,<2.33.dev0, we can conclude that all of:
dify-plugin>=0.2.0,<=0.2.2
dify-plugin==0.2.4
cannot be used.
And because only the following versions of dify-plugin are available:
dify-plugin<=0.2.0
dify-plugin==0.2.1
dify-plugin==0.2.2
dify-plugin==0.2.3
dify-plugin==0.2.4
dify-plugin>0.3.0
we can conclude that all of:
dify-plugin>=0.2.0,<0.2.3
dify-plugin>0.2.3,<0.3.0
cannot be used.
And because dify-plugin==0.2.3 was yanked and you require
dify-plugin>=0.2.0,<0.3.0, we can conclude that your requirements are
unsatisfiable.

hint: `requests` was requested with a pre-release marker (e.g.,
requests>=2.32.3,<2.33.dev0), but pre-releases weren't enabled (try:
--prelease=allow )
  

Image

Image

✔️ Expected Behavior

The installation was successful

Actual Behavior

Installation failed

Originally created by @D-S-William-Guo on GitHub (May 29, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Referenced this before, but still can't solve it. #20324 Firstly, I pulled all the images on my personal computer using docker compose, and then uploaded the GitHub source code and images to an isolated offline environment. Then, following the official Docs, I started the dify 1.4.1 project using docker compose. I downloaded the offline plugin package (e.g., `langgenius-openai_api_compatible_0.0.16.difypkg`) from my personal computer and transferred it to the offline environment for installation. The `PIP_MIRROR_URL` has been configured in the `.env` file. An error occurred during the plugin installation as follows: ``` 2025/05/29 01:26:42 full_duplex.go:27: [INFO]new plugin logged in: langgenius/openai_api_compatible:0.0.16 2025/05/29 01:26:42 full_duplex.go:59: [INFO]init environment for plugin langgenius/openai_api_compatible:0.0.16 [GIN] 2025/05/29 - 01:26:42 | 200 | 668.281µs | 172.23.0.8 | GET "/plugin/13693afc-ae8f-4a34-8f33-3b30af3b7b5e/management/install/tasks/abdcc036-588f-4cf9-982e-de2e70e5af51" [GIN] 2025/05/29 - 01:26:42 | 200 | 1.020106ms | 172.23.0.8 | GET "/plugin/13693afc-ae8f-4a34-8f33-3b30af3b7b5e/management/install/tasks?page=1&page_size=100" 2025/05/29 01:26:43 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: exit status 1, output: × No solution found when resolving dependencies: → Because only requests<=2.31.0 is available and all of: dify-plugin>=0.2.0,<=0.2.2 dify-plugin==0.2.4 depend on requests>=2.32.3,<2.33.dev0, we can conclude that all of: dify-plugin>=0.2.0,<=0.2.2 dify-plugin==0.2.4 cannot be used. And because only the following versions of dify-plugin are available: dify-plugin<=0.2.0 dify-plugin==0.2.1 dify-plugin==0.2.2 dify-plugin==0.2.3 dify-plugin==0.2.4 dify-plugin>0.3.0 we can conclude that all of: dify-plugin>=0.2.0,<0.2.3 dify-plugin>0.2.3,<0.3.0 cannot be used. And because dify-plugin==0.2.3 was yanked and you require dify-plugin>=0.2.0,<0.3.0, we can conclude that your requirements are unsatisfiable. hint: `requests` was requested with a pre-release marker (e.g., requests>=2.32.3,<2.33.dev0), but pre-releases weren't enabled (try: --prelease=allow ) ``` ![Image](https://github.com/user-attachments/assets/222e3798-2c57-442b-ad4c-06f44c4e6899) ![Image](https://github.com/user-attachments/assets/cce7d6b3-dfff-4b04-9fe7-b8d70cb06cbb) ### ✔️ Expected Behavior The installation was successful ### ❌ Actual Behavior Installation failed
yindo added the 🤔 cant-reproducedependencies labels 2026-02-21 19:16:33 -05:00
yindo closed this issue 2026-02-21 19:16:33 -05:00
Author
Owner

@D-S-William-Guo commented on GitHub (May 29, 2025):

I tried to download the plugin from the official website marketplace.dify.ai and also tried dify-plugin-repackaging, all to no avail.

@D-S-William-Guo commented on GitHub (May 29, 2025): I tried to download the plugin from the official website marketplace.dify.ai and also tried [dify-plugin-repackaging](https://github.com/junjiem/dify-plugin-repackaging), all to no avail.
Author
Owner

@dosubot[bot] commented on GitHub (May 29, 2025):

Your installation issue in the offline environment is caused by dependency resolution failures—specifically, the required version of the requests library (>=2.32.3) is not available, which prevents the dify-plugin from being installed. This is a known challenge when installing plugins offline, especially when dependencies are not bundled or mirrored locally.

Here are actionable steps to resolve this:

  1. Use the dify-plugin-repackaging tool to package the plugin along with all its dependencies before transferring it to your offline environment. This tool is designed to avoid fetching packages from PyPI during installation and ensures all required dependencies are included for offline use. If you already tried this and it failed, double-check that all dependencies (including the correct version of requests) are present in your repackaged bundle and that you are using a compatible Python version as required by the tool (source).

  2. Set the PIP_EXTRA_ARGS environment variable in your .env file to force pip to use only local packages. For example:

    PIP_EXTRA_ARGS="--no-index --find-links=/app/packages"
    

    Place all required .whl or .tar.gz files for dependencies (including the correct requests version) in /app/packages inside your Docker container. This ensures pip does not attempt to reach out to the internet and only installs from your local directory (source).

  3. If you have access to a working online environment, you can pre-install plugin dependencies by exporting the plugin data from the relevant tables in the dify_plugin database and copying the plugin files from /docker/volumes/plugin_daemon. Transfer these to your offline environment (source).

  4. If the dependency issue persists, check if upgrading the dify-plugin to a newer version resolves the compatibility problem. Sometimes, newer plugin versions relax or update dependency requirements, making offline installation easier (source).

If you continue to encounter issues, please confirm that all dependencies (including pre-release versions, if required) are available in your offline package directory and that your .env and Docker configurations are correctly set to use only local sources.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (May 29, 2025): <!-- Answer --> Your installation issue in the offline environment is caused by dependency resolution failures—specifically, the required version of the `requests` library (>=2.32.3) is not available, which prevents the `dify-plugin` from being installed. This is a known challenge when installing plugins offline, especially when dependencies are not bundled or mirrored locally. Here are actionable steps to resolve this: 1. Use the [dify-plugin-repackaging tool](https://github.com/junjiem/dify-plugin-repackaging) to package the plugin along with all its dependencies before transferring it to your offline environment. This tool is designed to avoid fetching packages from PyPI during installation and ensures all required dependencies are included for offline use. If you already tried this and it failed, double-check that all dependencies (including the correct version of `requests`) are present in your repackaged bundle and that you are using a compatible Python version as required by the tool ([source](https://github.com/langgenius/dify/issues/17990)). 2. Set the `PIP_EXTRA_ARGS` environment variable in your `.env` file to force pip to use only local packages. For example: ``` PIP_EXTRA_ARGS="--no-index --find-links=/app/packages" ``` Place all required `.whl` or `.tar.gz` files for dependencies (including the correct `requests` version) in `/app/packages` inside your Docker container. This ensures pip does not attempt to reach out to the internet and only installs from your local directory ([source](https://github.com/langgenius/dify/issues/15776)). 3. If you have access to a working online environment, you can pre-install plugin dependencies by exporting the plugin data from the relevant tables in the `dify_plugin` database and copying the plugin files from `/docker/volumes/plugin_daemon`. Transfer these to your offline environment ([source](https://github.com/langgenius/dify/discussions/16373)). 4. If the dependency issue persists, check if upgrading the `dify-plugin` to a newer version resolves the compatibility problem. Sometimes, newer plugin versions relax or update dependency requirements, making offline installation easier ([source](https://github.com/langgenius/dify/issues/17738)). If you continue to encounter issues, please confirm that all dependencies (including pre-release versions, if required) are available in your offline package directory and that your `.env` and Docker configurations are correctly set to use only local sources. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b448e391-44e7-46a6-818e-b8dcbb995efd?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20424)
Author
Owner

@D-S-William-Guo commented on GitHub (May 29, 2025):

By the way, I entered the docker-plugin-daemon container and executed pip list to check for conflicts.

Package                  Version
------------------------ --------
annotated-types          0.7.0
anyio                    4.9.0
blinker                  1.6.0
certifi                  2025.4.26
charset-normalizer       3.4.2
click                    8.2.1
dbus-python              1.3.2
dify_plugin              0.3.0
dpkt                     1.9.8
Flask                    3.0.3
gevent                   24.11.1
greenlet                 3.2.2
h11                      0.16.0
httpcore                 1.0.9
httpx                    0.28.1
idna                     3.1.0
itsdangerous             2.2.0
Jinja2                   3.1.6
MarkupSafe               3.0.2
multidict                6.4.4
packaging                25.0
pip                      24.0
propcache                0.3.1
pydantic                 2.11.5
pydantic_core            2.33.2
pydantic_settings        2.9.1
pydub                    0.25.1
Pygments                 3.48.2
python-dotenv            1.1.0
PyYAML                   6.0.2
regex                    2024.11.6
requests                 2.32.3
setuptools               80.9.0
sniffio                  1.3.1
socksio                  1.0.0
tiktoken                 0.8.0
typing_extensions        4.13.2
typing-inspection        0.4.1
urllib3                  2.4.0
uvicorn                  0.7.8
werkzeug                 3.0.6
wheel                    0.42.0
yarl                     1.20.0
zope.event               5.0
zope.interface           7.2
@D-S-William-Guo commented on GitHub (May 29, 2025): By the way, I entered the `docker-plugin-daemon` container and executed `pip list` to check for conflicts. ``` Package Version ------------------------ -------- annotated-types 0.7.0 anyio 4.9.0 blinker 1.6.0 certifi 2025.4.26 charset-normalizer 3.4.2 click 8.2.1 dbus-python 1.3.2 dify_plugin 0.3.0 dpkt 1.9.8 Flask 3.0.3 gevent 24.11.1 greenlet 3.2.2 h11 0.16.0 httpcore 1.0.9 httpx 0.28.1 idna 3.1.0 itsdangerous 2.2.0 Jinja2 3.1.6 MarkupSafe 3.0.2 multidict 6.4.4 packaging 25.0 pip 24.0 propcache 0.3.1 pydantic 2.11.5 pydantic_core 2.33.2 pydantic_settings 2.9.1 pydub 0.25.1 Pygments 3.48.2 python-dotenv 1.1.0 PyYAML 6.0.2 regex 2024.11.6 requests 2.32.3 setuptools 80.9.0 sniffio 1.3.1 socksio 1.0.0 tiktoken 0.8.0 typing_extensions 4.13.2 typing-inspection 0.4.1 urllib3 2.4.0 uvicorn 0.7.8 werkzeug 3.0.6 wheel 0.42.0 yarl 1.20.0 zope.event 5.0 zope.interface 7.2 ```
Author
Owner

@crazywoola commented on GitHub (May 29, 2025):

I think you need to uninstall the plugin and install it again.

@crazywoola commented on GitHub (May 29, 2025): I think you need to uninstall the plugin and install it again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14295