【问题标题】:I am getting an error when I am trying to setup chaquopy(The error reads: failed to start (org.gradle.process.internal.ExecException)尝试设置 chaquopy 时出现错误(错误显示:启动失败(org.gradle.process.internal.ExecException)
【发布时间】:2019-01-17 15:26:30
【问题描述】:

This is the screenshot of the error

当我尝试使用 macOS 和 python 3.6 设置 chaquopy 时出现此错误。

我在 setting up chaquopy 上的要求步骤。我已经添加了插件,做了 ABI 的选择、开发、需求。

遇到的错误是:

failed to start (org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/usr/local/lib/python3.6'') Please set python.buildPython to your Python executable path.

我的build.gradle 如下:

apply plugin: 'com.chaquo.python'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.vishrutjaipuria.facialrecognition"
        minSdkVersion 27
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
        python {
            buildPython "/usr/local/lib/python3.6"
        }
        python {
            pip {
                install "scipy==1.0.1"
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
android {
    flavorDimensions "abi"
    productFlavors {
        arm {
            dimension "abi"
            ndk { abiFilters "armeabi-v7a" }
        }
        x86 {
            dimension "abi"
            ndk { abiFilters "x86" }
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

【问题讨论】:

    标签: android chaquopy


    【解决方案1】:

    正如the documentation 所说,buildPython 应该设置为 Python 可执行文件,而不是 Python 库目录。将其设置为可执行路径:这可能是/usr/local/bin/python3.6,但请先检查自己。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-05
      • 1970-01-01
      • 1970-01-01
      • 2016-12-16
      • 2016-02-18
      • 2018-05-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多