Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

import: command not found while install numpy package #548

Open
@suiwenfeng

Description

How to reproduce?

follow the official doc to use graalpy & numpy in maven project.

> pom configuration

 <graalpy.version>24.2.0</graalpy.version>
 ...
 <plugin>
 <groupId>org.graalvm.python</groupId>
 <artifactId>graalpy-maven-plugin</artifactId>
 <version>${graalpy.version}</version>
 ...
 <packages>
 ...
 <package>numpy==2.0.2</package>
 </packages>
 ...
 </plugin>

> environment

$ sw_vers
ProductName: macOS
ProductVersion: 15.5
BuildVersion: 24F74

$ java --version
java 24 2025年03月18日
Java(TM) SE Runtime Environment Oracle GraalVM 24+36.1 (build 24+36-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 24+36.1 (build 24+36-jvmci-b01, mixed mode, sharing)

$ python --version
Python 3.11.13

$ cython --version
Cython version 3.1.4

> error log

 [118/322] Generating 'numpy/_core/_multiarray_umath.graalpy242-311-native-aarch64-darwin.so.p/templ_common.h'
 WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
 WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime (file:/Users/10005612/.m2/repository/org/graalvm/truffle/truffle-runtime/24.2.0/truffle-runtime-24.2.0.jar)
 WARNING: Please consider reporting this to the maintainers of class com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime
 WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
 [119/322] Compiling Cython source numpy/random/_bounded_integers.pyx
 FAILED: [code=2] numpy/random/_bounded_integers.graalpy242-311-native-aarch64-darwin.so.p/numpy/random/_bounded_integers.pyx.c
 cython -M --fast-fail -3 numpy/random/_bounded_integers.pyx -o numpy/random/_bounded_integers.graalpy242-311-native-aarch64-darwin.so.p/numpy/random/_bounded_integers.pyx.c
 /private/var/folders/1n/bhj601b52nl1rfz9nvw1tr_46nf24r/T/pip-build-env-kuu27pz5/overlay/bin/cython: line 3: import: command not found
 /private/var/folders/1n/bhj601b52nl1rfz9nvw1tr_46nf24r/T/pip-build-env-kuu27pz5/overlay/bin/cython: line 4: import: command not found
 /private/var/folders/1n/bhj601b52nl1rfz9nvw1tr_46nf24r/T/pip-build-env-kuu27pz5/overlay/bin/cython: line 5: from: command not found
 /private/var/folders/1n/bhj601b52nl1rfz9nvw1tr_46nf24r/T/pip-build-env-kuu27pz5/overlay/bin/cython: line 7: syntax error near unexpected token `('
 /private/var/folders/1n/bhj601b52nl1rfz9nvw1tr_46nf24r/T/pip-build-env-kuu27pz5/overlay/bin/cython: line 7: ` sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])'
 [120/322] Compiling C object numpy/random/libnpyrandom.a.p/src_distributions_random_hypergeometric.c.o

full.log is here

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

        AltStyle によって変換されたページ (->オリジナル) /