Skip to content

distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both #405

Description

@pai7

Unable to Build due to the following errors.

Executing tasks: [:app:assembleDebug] in project /Users/dp/StudioProjects/DootAndroid

Starting Gradle Daemon...
Gradle Daemon started in 1 s 809 ms

> Configure project :app
Warning: This version of Chaquopy has not been tested with Android Gradle plugin versions beyond 4.1.0. If you experience problems, please edit the version of com.android.tools.build:gradle in your top-level build.gradle file. See https://chaquo.com/chaquopy/doc/current/versions.html.

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:mergeDebugMlModels UP-TO-DATE
> Task :app:generateDebugMlModelClass UP-TO-DATE
> Task :app:extractPythonBuildPackages UP-TO-DATE

> Task :app:generateDebugPythonRequirements
Chaquopy: Installing for armeabi-v7a
Looking in indexes: https://pypi.org/simple, https://chaquo.com/pypi-7.0
Collecting numpy
  Using version 1.17.4 (newest version is 1.19.4, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/numpy/numpy-1.17.4-3-cp38-cp38-android_16_armeabi_v7a.whl
Collecting pandas
  Using version 0.25.3 (newest version is 1.1.4, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/pandas/pandas-0.25.3-1-cp38-cp38-android_16_armeabi_v7a.whl
Collecting sklearn
Collecting pickle-mixin
Collecting requests
  Using cached https://files.pythonhosted.org/packages/39/fc/f91eac5a39a65f75a7adb58eac7fa78871ea9872283fb9c44e6545998134/requests-2.25.0-py2.py3-none-any.whl
Collecting regex
  Using version 2020.1.8 (newest version is 2020.11.13, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/regex/regex-2020.1.8-0-cp38-cp38-android_16_armeabi_v7a.whl
Collecting nltk
Collecting chaquopy-openblas>=0.2.20 (from numpy)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-openblas/chaquopy_openblas-0.2.20-5-py3-none-android_16_armeabi_v7a.whl
Collecting pytz>=2017.2 (from pandas)
  Using cached https://files.pythonhosted.org/packages/12/f8/ff09af6ff61a3efaad5f61ba5facdf17e7722c4393f7d8a66674d2dbd29f/pytz-2020.4-py2.py3-none-any.whl
Collecting chaquopy-libcxx>=7000 (from pandas)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-libcxx/chaquopy_libcxx-7000-2-py3-none-android_16_armeabi_v7a.whl
Collecting python-dateutil>=2.6.1 (from pandas)
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting scikit-learn (from sklearn)
  Using cached https://chaquo.com/pypi-7.0/scikit-learn/scikit_learn-0.23.2-2-cp38-cp38-android_16_armeabi_v7a.whl
Collecting chardet<4,>=3.0.2 (from requests)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
  Using cached https://files.pythonhosted.org/packages/c1/6f/3d85f0850962279a7e4c622695d7b3171e95ac65308a57d3b29738b27149/certifi-2020.11.8-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests)
  Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting urllib3<1.27,>=1.21.1 (from requests)
  Using cached https://files.pythonhosted.org/packages/f5/71/45d36a8df68f3ebb098d6861b2c017f3d094538c0fb98fa61d4dc43e69b9/urllib3-1.26.2-py2.py3-none-any.whl
Collecting tqdm (from nltk)
  Using cached https://files.pythonhosted.org/packages/e9/4e/afa45872365fe2abd13c8022d39348c01808b8cfeea129937920d7bb2244/tqdm-4.54.0-py2.py3-none-any.whl
Collecting click (from nltk)
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
Collecting joblib (from nltk)
  Using cached https://files.pythonhosted.org/packages/fc/c9/f58220ac44a1592f79a343caba12f6837f9e0c04c196176a3d66338e1ea8/joblib-0.17.0-py3-none-any.whl
Collecting chaquopy-libgfortran>=4.9 (from chaquopy-openblas>=0.2.20->numpy)
  Using cached https://chaquo.com/pypi-7.0/chaquopy-libgfortran/chaquopy_libgfortran-4.9-0-py3-none-android_16_armeabi_v7a.whl
Collecting six>=1.5 (from python-dateutil>=2.6.1->pandas)
  Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting threadpoolctl>=2.0.0 (from scikit-learn->sklearn)
  Using cached https://files.pythonhosted.org/packages/f7/12/ec3f2e203afa394a149911729357aa48affc59c20e2c1c8297a60f33f133/threadpoolctl-2.1.0-py3-none-any.whl
Collecting scipy>=0.19.1 (from scikit-learn->sklearn)
  Using version 1.4.1 (newest version is 1.5.4, but Chaquopy prefers native wheels)
  Using cached https://chaquo.com/pypi-7.0/scipy/scipy-1.4.1-0-cp38-cp38-android_16_armeabi_v7a.whl
Installing collected packages: chaquopy-libgfortran, chaquopy-openblas, numpy, pytz, chaquopy-libcxx, six, python-dateutil, pandas, threadpoolctl, joblib, scipy, scikit-learn, sklearn, pickle-mixin, chardet, certifi, idna, urllib3, requests, regex, tqdm, click, nltk
Exception:
Traceback (most recent call last):
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/basecommand.py", line 236, in main
    status = self.run(options, args)
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/commands/install.py", line 348, in run
    use_user_site=options.use_user_site,
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/req/__init__.py", line 49, in install_given_reqs
    **kwargs
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/req/req_install.py", line 755, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/req/req_install.py", line 983, in move_wheel_files
    warn_script_location=warn_script_location,
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/wheel.py", line 218, in move_wheel_files
    prefix=prefix,
  File "/Users/dp/StudioProjects/DootAndroid/app/build/generated/python/bp.zip/pip/_internal/locations.py", line 165, in distutils_scheme
    i.finalize_options()
  File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 248, in finalize_options
    "must supply either home or prefix/exec-prefix -- not both")
distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
Chaquopy: Exit status 2

> Task :app:generateDebugPythonRequirements FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateDebugPythonRequirements'.
> Process 'command '/usr/local/bin/python3.7'' finished with non-zero exit value 1
  
  To view full details in Android Studio:
  * In version 3.6 and newer, click the 'Build: failed' caption to the left of this message.
  * In version 3.5 and older, click the 'Toggle view' button to the left of this message.
  * Then scroll up to see the full output.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 26s
5 actionable tasks: 1 executed, 4 up-to-date

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions