Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Scipy is not installed due to "Error: 'numpy' must be installed before running the build." #2509

@killangell

Description

@killangell

Checklist

  • the issue is indeed a bug and not a support request
  • issue doesn't already exist: https://github.com/kivy/python-for-android/issues
  • I have a short, runnable example that reproduces the issue
  • I reproduced the problem with the latest development version (p4a.branch = develop)
  • I used the grave accent (aka backticks) to format code or logs when appropriated

Versions

  • Python: 3.8
  • OS:
  • Kivy:
  • Cython:
  • OpenJDK:

kivy@kivy-virtual-machine:~/work/project/biga_futures/package$ p4a --version
2021.09.05

Description

Scipy is pending on numpy as I saw scipy recipe below:

depends = ['setuptools', 'cython', 'numpy', 'lapack']

It's failed been installed for error below, more logs see Logs section.
"Error: 'numpy' must be installed before running the build."

buildozer.spec

Command:
p4a apk --private $HOME/work/project/biga_futures/ --package=org.kivy.biga_futures --name "biga_futures" --version 0.1 --bootstrap=sdl2 --requirements=python3,kivy,pandas,typing_extensions,chardet,requests,urllib3,psutil,jwt,cryptography,numpy,scipy --permission PERMISSIONS INTERNET

No matter numpy is in the '--requirements' or not, nothing different.

Spec file:

// REPLACE ME: Paste your buildozer.spec file here

Logs

[INFO]: pandas said it is already built, skipping
[INFO]: Building scipy for armeabi-v7a
[INFO]: scipy apparently isn't already in site-packages
[INFO]: Building compiled components in scipy
[INFO]: -> directory context /home/kivy/.local/share/python-for-android/build/other_builds/scipy/armeabi-v7a__ndk_target_21/scipy
[INFO]: -> running python3 setup.py build_ext -v -j 1
working: Error: 'numpy' must be installed before running the build. Exception in thread background thread for pid 1206223:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 1683, in wrap
fn(*rgs, **kwargs)
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 2662, in background_thread
handle_exit_code(exit_code)
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 2349, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:

RAN: /home/kivy/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v -j 1

STDOUT:
Error: 'numpy' must be installed before running the build.

STDERR:

Traceback (most recent call last):
File "/home/kivy/.local/bin/p4a", line 8, in
sys.exit(main())
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 725, in init
getattr(self, command)(args)
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 212, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/build.py", line 580, in build_recipes
recipe.build_arch(arch)
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/recipe.py", line 1011, in build_arch
self.build_compiled_components(arch)
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/recipes/scipy/init.py", line 16, in build_compiled_components
super().build_compiled_components(arch)
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/recipe.py", line 1022, in build_compiled_components
shprint(hostpython, 'setup.py', self.build_cmd, '-v',
File "/home/kivy/.local/lib/python3.8/site-packages/pythonforandroid/logger.py", line 167, in shprint
for line in output:
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 953, in next
self.wait()
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 879, in wait
self.handle_command_exit_code(exit_code)
File "/home/kivy/.local/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:

RAN: /home/kivy/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v -j 1

STDOUT:
Error: 'numpy' must be installed before running the build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions