Skip to content

Commit d160a3d

Browse files
fangerermsimacek
authored andcommitted
Update readme
1 parent 81d8813 commit d160a3d

File tree

1 file changed

+35
-30
lines changed

1 file changed

+35
-30
lines changed

README.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
11
# GraalVM Implementation of Python
22

33
This is an early-stage experimental implementation of Python. A primary goal is
4-
to support SciPy and its constituent libraries. This Python implementation
5-
currently aims to be compatible with Python 3.8, but it is a long way from
6-
there, and it is very likely that any Python program that requires any packages
7-
at all will hit something unsupported. At this point, the Python implementation
8-
is made available for experimentation and curious end-users.
4+
to support SciPy and its constituent libraries. GraalPython can usually execute
5+
pure Python code faster than CPython (but not when C extensions are
6+
involved). The GraalVM Python implementation currently aims to be compatible
7+
with Python 3.8, but it is a long way from there, and it is very likely that any
8+
Python program that uses more features of standard library modules or external
9+
packages will hit something unsupported. At this point, the Python
10+
implementation is made available for experimentation and curious end-users.
911

1012
### Trying it
1113

12-
To try it, you can use the bundled releases from
13-
[www.graalvm.org](https://www.graalvm.org/downloads/). For more information and
14-
some examples of what you can do with it, check out the
15-
[reference](https://www.graalvm.org/reference-manual/python/).
14+
The easiest option to try GraalPython is
15+
[Pyenv](https://github.com/pyenv/pyenv/), the Python version manager. It allows
16+
you to easily install different GraalPython releases. To get version 20.2, for
17+
example, just run `pyenv install graalpython-20.2`.
1618

17-
### Create a virtual environment
19+
To try GraalPython with a full GraalVM, including the support for Java embedding
20+
and interop with other languages, you can use the bundled releases from
21+
[www.graalvm.org](https://www.graalvm.org/downloads/).
1822

19-
The best way of using the GraalVM implementation of Python is out of a virtual environment. This generates
20-
wrapper scripts and makes the implementation usable from shell as standard Python interpreter. To do so
21-
execute the following in the project directory:
23+
If you want to build GraalPython from source, checkout this repository and the
24+
[mx](https://github.com/graalvm/mx) build tool, and run `mx --dy /compiler
25+
python-gvm` in the `graalpython` repository root. If the build is fine, it will
26+
print the full path to the `graalpython` executable as the last line of output.
2227

23-
Build GraalPython:
28+
For more information and some examples of what you can do with GraalPython,
29+
check out the [reference](https://www.graalvm.org/reference-manual/python/).
2430

25-
```
26-
mx build
27-
```
31+
### Create a virtual environment
2832

29-
Create the venv:
33+
The best way of using the GraalVM implementation of Python is out of a virtual
34+
environment. To create the venv, run the following:
3035

3136
```
32-
mx python -m venv <dir-to-venv>
37+
graalpython -m venv <dir-to-venv>
3338
```
3439

3540
To activate the environment in your shell session call:
@@ -47,28 +52,28 @@ At the moment not enough of the standard library is implemented to run the
4752
standard package installers for many packages. As a convenience, we provide a
4853
simple module to install packages that we know to be working (including
4954
potential patches required for those packages). Try the following to find out
50-
more:
55+
which packages are at least partially supported and tested by us in our CI:
5156

5257
```
53-
graalpython -m ginstall --help
58+
graalpython -m ginstall install --help
5459
```
5560

56-
As a slightly more exciting example, try:
61+
As a slightly exciting example, try:
5762

5863
```
59-
graalpython -m ginstall install numpy
64+
graalpython -m ginstall install pandas
6065
```
6166

62-
If all goes well (also consider native dependencies of NumPy), you should be
63-
able to `import numpy` afterwards.
67+
If all goes well (also consider native dependencies of NumPy), you should be
68+
able to `import numpy` and `import pandas` afterwards.
6469

6570
Support for more extension modules is high priority for us. We are actively
6671
building out our support for the Python C API to make extensions such as NumPy,
67-
SciPy, Scikit-learn, Pandas, Tensorflow and the like work. This work means that
68-
some other extensions might also already work, but we're not actively testing
69-
other extensions right now and cannot promise anything. Note that to try
70-
extensions on this implementation, you have to download, build, and install them
71-
manually for now.
72+
SciPy, Scikit-learn, Pandas, Tensorflow and the like work fully. This work means
73+
that some other extensions might also already work, but we're not actively
74+
testing other extensions right now and cannot promise anything. Note that to try
75+
other extensions on this implementation, you have to download, build, and
76+
install them manually for now.
7277

7378
### Polyglot Usage
7479

0 commit comments

Comments
 (0)