403 Forbidden error while installing plugins #21582

Closed
opened 2026-02-21 20:13:18 -05:00 by yindo · 2 comments
Owner

Originally created by @SnowleopardXI on GitHub (Jan 12, 2026).

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.11.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Install plugin from marketplace
  2. Failed with 403 code for tsinghua repo

✔️ Expected Behavior

Without errors

Actual Behavior

At webpage:

failed to launch plugin: failed to install dependencies: failed to install dependencies: exit status 2, output: DEBUG uv 0.9.18 TRACE Checking lock for /root/.cache/uvat/root/.cache/uv/.lockDEBUG Acquired shared lock for/root/.cache/uvDEBUG Searching for default Python interpreter in virtual environments TRACE Querying interpreter executable at /app/storage/cwd/spance/db_client_node-0.1.47@60965f21262129b75b2e01543190ab65021b75b55441532f77f88fcd7b71095d/.venv/bin/python3 DEBUG Found cpython-3.12...r: Failed to fetch: https://mirrors.ustc.edu.cn/pypi/packages/2d/75/364847b879eb630b3ac8293798e380e441a957c53657995053c5ec39a316/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Caused by: HTTP status client error (403 Forbidden) for url (https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/2d/75/364847b879eb630b3ac8293798e380e441a957c53657995053c5ec39a316/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl) failed to init environment

Image

At container logs:

Caused by: HTTP status client error (403 Forbidden) for url (https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f9/90/a8832dcc43bc066329d9dc9e8a21be304fb69ae4c4ee02629df37494c61b/dify_plugin-0.2.1-py3-none-any.whl) error: Failed to fetch: https://mirrors.ustc.edu.cn/pypi/packages/f9/90/a8832dcc43bc066329d9dc9e8a21be304fb69ae4c4ee02629df37494c61b/dify_plugin-0.2.1-py3-none-any.whl Caused by: HTTP status client error (403 Forbidden) for url (https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f9/90/a8832dcc43bc066329d9dc9e8a21be304fb69ae4c4ee02629df37494c61b/dify_plugin-0.2.1-py3-none-any.whl) failed to init environment

Originally created by @SnowleopardXI on GitHub (Jan 12, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Install plugin from marketplace 2. Failed with 403 code for tsinghua repo ### ✔️ Expected Behavior Without errors ### ❌ Actual Behavior At webpage: `failed to launch plugin: failed to install dependencies: failed to install dependencies: exit status 2, output: DEBUG uv 0.9.18 TRACE Checking lock for `/root/.cache/uv` at `/root/.cache/uv/.lock` DEBUG Acquired shared lock for `/root/.cache/uv` DEBUG Searching for default Python interpreter in virtual environments TRACE Querying interpreter executable at /app/storage/cwd/spance/db_client_node-0.1.47@60965f21262129b75b2e01543190ab65021b75b55441532f77f88fcd7b71095d/.venv/bin/python3 DEBUG Found cpython-3.12...r: Failed to fetch: https://mirrors.ustc.edu.cn/pypi/packages/2d/75/364847b879eb630b3ac8293798e380e441a957c53657995053c5ec39a316/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Caused by: HTTP status client error (403 Forbidden) for url (https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/2d/75/364847b879eb630b3ac8293798e380e441a957c53657995053c5ec39a316/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl) failed to init environment ` <img width="684" height="539" alt="Image" src="https://github.com/user-attachments/assets/b2f1efbb-d875-48f7-b3ec-2a820d1ecb34" /> At container logs: `Caused by: HTTP status client error (403 Forbidden) for url (https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f9/90/a8832dcc43bc066329d9dc9e8a21be304fb69ae4c4ee02629df37494c61b/dify_plugin-0.2.1-py3-none-any.whl) error: Failed to fetch: https://mirrors.ustc.edu.cn/pypi/packages/f9/90/a8832dcc43bc066329d9dc9e8a21be304fb69ae4c4ee02629df37494c61b/dify_plugin-0.2.1-py3-none-any.whl Caused by: HTTP status client error (403 Forbidden) for url (https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f9/90/a8832dcc43bc066329d9dc9e8a21be304fb69ae4c4ee02629df37494c61b/dify_plugin-0.2.1-py3-none-any.whl) failed to init environment `
yindo added the 🐞 bug label 2026-02-21 20:13:18 -05:00
yindo closed this issue 2026-02-21 20:13:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 12, 2026):

Hi @SnowleopardXI! I'm Dosu and I’m helping the dify team.

The 403 Forbidden error from the Tsinghua (and USTC) PyPI mirrors is due to access restrictions on those mirrors, not a bug in Dify. The recommended solution is to set the PIP_MIRROR_URL environment variable in your Docker setup to a PyPI mirror that is accessible from your environment. For example, you can use:

  • Aliyun: https://mirrors.aliyun.com/pypi/simple
  • Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple
  • Official PyPI: https://pypi.org/simple

To do this, add or update the following line in your .env file or in the environment section of the plugin_daemon and sandbox services in your docker-compose.yaml:

PIP_MIRROR_URL=https://mirrors.aliyun.com/pypi/simple

After making this change, restart the affected containers (plugin_daemon and sandbox) for the new setting to take effect. If you still encounter issues, try a different mirror or check your network/firewall settings. Increasing timeout values (like PYTHON_ENV_INIT_TIMEOUT or UV_HTTP_TIMEOUT) can help with slow networks, but won't resolve 403 errors from mirror access restrictions.

This is a known and documented issue in the Dify community, and changing the mirror URL is the primary solution recommended by maintainers and other users.
Reference 1
Reference 2
Reference 3

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 12, 2026): <!-- Greeting --> Hi @SnowleopardXI! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The 403 Forbidden error from the Tsinghua (and USTC) PyPI mirrors is due to access restrictions on those mirrors, not a bug in Dify. The recommended solution is to set the PIP_MIRROR_URL environment variable in your Docker setup to a PyPI mirror that is accessible from your environment. For example, you can use: - Aliyun: `https://mirrors.aliyun.com/pypi/simple` - Tsinghua: `https://pypi.tuna.tsinghua.edu.cn/simple` - Official PyPI: `https://pypi.org/simple` To do this, add or update the following line in your `.env` file or in the `environment` section of the `plugin_daemon` and `sandbox` services in your `docker-compose.yaml`: ``` PIP_MIRROR_URL=https://mirrors.aliyun.com/pypi/simple ``` After making this change, restart the affected containers (plugin_daemon and sandbox) for the new setting to take effect. If you still encounter issues, try a different mirror or check your network/firewall settings. Increasing timeout values (like `PYTHON_ENV_INIT_TIMEOUT` or `UV_HTTP_TIMEOUT`) can help with slow networks, but won't resolve 403 errors from mirror access restrictions. This is a known and documented issue in the Dify community, and changing the mirror URL is the primary solution recommended by maintainers and other users. [Reference 1](https://github.com/langgenius/dify-official-plugins/issues/925) [Reference 2](https://github.com/langgenius/dify-official-plugins/issues/2086) [Reference 3](https://github.com/langgenius/dify-official-plugins/issues/2245) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9b552646-6771-424b-add7-978480d0de6a?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20403%20Forbidden%20error%20from%20the%20Tsinghua%20%28and%20USTC%29%20PyPI%20mirrors%20is%20due%20to%20access%20restrictions%20on%20those%20mirrors%2C%20not%20a%20bug%20in%20Dify.%20The%20recommended%20solution%20is%20to%20set%20the%20PIP_MIRROR_URL%20environment%20variable%20in%20your%20Docker%20setup%20to%20a%20PyPI%20mirror%20that%20is%20accessible%20from%20your%20environment.%20For%20example%2C%20you%20can%20use%3A%0A%0A-%20Aliyun%3A%20%60https%3A//mirrors.aliyun.com/pypi/simple%60%0A-%20Tsinghua%3A%20%60https%3A//pypi.tuna.tsinghua.edu.cn/simple%60%0A-%20Official%20PyPI%3A%20%60https%3A//pypi.org/simple%60%0A%0ATo%20do%20this%2C%20add%20or%20update%20the%20following%20line%20in%20your%20%60.env%60%20file%20or%20in%20the%20%60environment%60%20section%20of%20the%20%60plugin_daemon%60%20and%20%60sandbox%60%20services%20in%20your%20%60docker-compose.yaml%60%3A%0A%0A%60%60%60%0APIP_MIRROR_URL%3Dhttps%3A//mirrors.aliyun.com/pypi/simple%0A%60%60%60%0A%0AAfter%20making%20this%20change%2C%20restart%20the%20affected%20containers%20%28plugin_daemon%20and%20sandbox%29%20for%20the%20new%20setting%20to%20take%20effect.%20If%20you%20still%20encounter%20issues%2C%20try%20a%20different%20mirror%20or%20check%20your%20network/firewall%20settings.%20Increasing%20timeout%20values%20%28like%20%60PYTHON_ENV_INIT_TIMEOUT%60%20or%20%60UV_HTTP_TIMEOUT%60%29%20can%20help%20with%20slow%20networks%2C%20but%20won%27t%20resolve%20403%20errors%20from%20mirror%20access%20restrictions.%0A%0AThis%20is%20a%20known%20and%20documented%20issue%20in%20the%20Dify%20community%2C%20and%20changing%20the%20mirror%20URL%20is%20the%20primary%20solution%20recommended%20by%20maintainers%20and%20other%20users.%20%20%0A%5BReference%201%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/925%29%20%20%0A%5BReference%202%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2086%29%20%20%0A%5BReference%203%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2245%29)&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/30851)
Author
Owner

@SnowleopardXI commented on GitHub (Jan 12, 2026):

Change to aliyun resovled

@SnowleopardXI commented on GitHub (Jan 12, 2026): ### Change to aliyun resovled
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21582