Questions tagged [graalpython]
`graalpython` is name of GraalVM Python executable. GraalVM Python is Python implementation https://www.graalvm.org/python/. It is module of GraalVM, installed with `gu install python`, but also can be installed and used independently as any Python implementation. https://github.com/oracle/graalpython
graalpython
17
questions
1
vote
0
answers
125
views
How does one disassemble Python graal bytecode?
I have been considering extending the cross-version python disassembler xdis for Python Graal.
GraalPython provides a Python Code type that is similar to Python's Code type, but the underlying ...
3
votes
1
answer
159
views
How to add packages to Graalvm python polyglot?
I followed the StackOverflow question Here and the subsequent link https://medium.com/graalvm/truffle-unchained-13887b77b62c in order to setup a working example of running Python from a Spring Boot ...
1
vote
1
answer
71
views
When running python with graalvm (Graalpy) can line numbers be included in errors
I am using python as a scripting language within java using graalvm but when the python script has errors the line number of the error is not reported.
For example the following fails with the message ...
-1
votes
1
answer
49
views
Passing and Returning Java Map to GraalVM python
I want to pass java map to python code and access the map values in python, and then store the results in a map, then access the results in Java. I'm stuck with the first step to pass java map to ...
1
vote
1
answer
377
views
Running Javascript and Python code in a Java 15 application
I'm running Javascript code in my Java 15 application with GraalVM. It is a web application that runs on Tomee. It works fine, and now I also need to run Python code with GraalVM.
What are the ...
0
votes
1
answer
292
views
Module not found if graalpy is packaged in Spring Boot Jar
I'm building a Spring Boot (3 RC1) application with some Python code (GraalVM 22.3). Running the application in dev mode works. After building Jar with Maven I get an error:
Caused by: org.graalvm....
0
votes
1
answer
380
views
Cannot compile Spring Boot to native image with Python language support
I'm trying to build a native image (GraalVM 22.3) from a Spring Boot 3 RC1 application with Python language support on Apple M1. I can build the native image without Python language support. But when ...
0
votes
1
answer
483
views
How to execute a python script in Spring Boot with GraalVM?
I'm struggling executing a python script in a Spring Boot application with GraalVM. The code works without Spring Boot in a simple library. The problem is that there are no members found and ...
0
votes
1
answer
277
views
Importing a local python file in an embedded graalpython script fails
Is it possible to import a local python script in another script that is run from Java using graalpython?
On the Java (Scala) side, the code looks like this:
val context = Context.newBuilder("...
0
votes
1
answer
119
views
How to add package to graalpython known packges list?
graalpython -m ginstall install --help will list packages known to graalpython:
Known packages are pytest, pytest_parallel, py, attrs, pyparsing, packaging, more_itertools, atomicwrites, pluggy, zipp, ...
1
vote
1
answer
633
views
Bundle GraalVM engine and graalpython with Java application
There is a way to run Python scripts that uses packages from Java using GraalVM and its Python module graalpython. Here is example https://github.com/paulvi/graalpython-java-template
I wonder if it is ...
1
vote
1
answer
1k
views
In graalpython what is difference between `ginstall` and `pip`?
In graalpython https://www.graalvm.org/python/ what is difference between ginstall and pip? Which one to use?
0
votes
1
answer
7k
views
run Python in GraalVM - `import requests` fails with Exception: You need either charset_normalizer or chardet installed (requests init failure)
I try to run Python script in GraalVm and it fails on
import requests
And it seems GraalVM issue, as the script work with usual python3.
Java code:
import org.graalvm.polyglot.Context;
import org....
1
vote
2
answers
644
views
run Python in GraalVM - Operation is not allowed for: at org.graalvm.truffle/com.oracle.truffle.polyglot.FileSystems.forbidden(FileSystems.java:1345)
I play with GraalVM, running Python from Java
import org.graalvm.polyglot.*;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class HelloPolyglot {
...
1
vote
2
answers
255
views
Encounter errors when install pandas inn graalpython
When I compile graalpython -m ginstall install pandas or graalpython -m ginstall install bumpy
I got the following error, please comment how to fix the error. Thank you.
line 54, in __init__
File &...