- Install Julia
- It is a good idea to use juliaup.
- Install
rye
- Please follow the instructions.
- Optionally, you can install uv which is an extremely fast Python package installer and resolver, written in Rust.
$ curl -LsSf https://astral.sh/uv/install.sh | sh
and run the following command to set uv as a backend.
$ rye config --set-bool behavior.use-uv=true
Here is an output from my machine
$ julia --version
julia version 1.10.2
$ rye --version
rye 0.16.0
commit: 0.16.0 (c003223d5 2023-12-16)
platform: macos (x86_64)
self-python: [email protected]
symlink support: true
$ git clone [email protected]:terasakisatoshi/jldev_rye.git
$ cd jldev_rye
$ rye sync
$ julia --project -e 'using Pkg; Pkg.instantiate()'
Assuming you want to run file.py
, please use the following command:
$ rye run python file.py
Assuming you want to run file.jl
, please use the following command:
$ julia --project file.jl
That's it. Go on to the next section.
from matplotlib import pyplot as plt
from jlrye.lorenz_attractor import generate_points
df = generate_points()
ax = plt.figure().add_subplot(projection="3d")
ax.plot(df.x, df.y, df.z, markersize=2, marker="o")
ax.set_title("Lorenz Attractor")
plt.show()
using StatsPlots
using JLRye
df = JLRye.generate_points()
@df df plot3d(:x, :y, :z, marker=2, legend=false, title="Lorenz Attractor")
If you are a Pythonista, you may want to run the following script:
using PythonPlot: pyplot as plt
using JLRye
df = JLRye.generate_points()
ax = plt.figure().add_subplot(projection="3d")
ax.plot(df.x, df.y, df.z, markersize=2, marker="o")
ax.set_title("Lorenz Attractor")
plt.show()
from matplotlib import pyplot as plt
import juliacall
from jlrye.julia_interface import JLRye
jldf = JLRye.generate_points()
df = juliacall.PythonCall.pytable(jldf)
ax = plt.figure().add_subplot(projection="3d")
ax.plot(df.x, df.y, df.z, markersize=2, marker="o")
ax.set_title("Lorenz Attractor")
plt.show()
using DataFrames: DataFrame
using PythonCall: PyTable
using StatsPlots
using JLRye: jlrye
pydf = jlrye.generate_points()
df = DataFrame(PyTable(pydf))
@df df plot3d(:x, :y, :z, marker=2, legend=false, title="Lorenz Attractor")
$ rye sync
$ rye run pytest
$ julia --project -e 'using Pkg; Pkg.instantiate()'
$ julia --project -e 'using Pkg; Pkg.test()'