Skip to content

Failed to install python dependencies due to http mirror #186

@Tiaonmmn

Description

@Tiaonmmn

Sandbox failed to install package:

server.go:47: [INFO]installing python dependencies
setup.go:140: [INFO]Looking in indexes: http://XXXXXX/simple
setup.go:146: [ERROR]failed to wait for the command to complete: exit status 1
panic:

On file internal/core/runner/python/setup.go, following code are about to install package using pip:

		// install dependencies
		pipMirrorURL := static.GetDifySandboxGlobalConfigurations().PythonPipMirrorURL

		// Create the base command
		args := []string{"install", "-r", "requirements.txt"}
		if pipMirrorURL != "" {
			// If a mirror URL is provided, include it in the command arguments
			args = append(args, "-i", pipMirrorURL)
		}
		cmd := exec.Command("pip3", args...)

Using pip to install package with http mirror url will fail without adding --trusted-host.
Could you please install package with uv, like dify-plugin-daemon?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions