-1

这是错误的截图

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

我正在设置 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'
}
4

1 回答 1

0

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

于 2019-01-25T16:57:00.777 回答