@@ -61,6 +61,15 @@ the `Math.sin` in Ruby:
61
61
Type conversions from Ruby to Python are automatically performed for numeric,
62
62
boolean, string, arrays, and hashes.
63
63
64
+ ### Specifying the Python version
65
+
66
+ If you want to use a specific version of Python instead of the default,
67
+ you can change the Python version by setting the ` PYTHON ` environment variable
68
+ to the path of the ` python ` executable.
69
+
70
+ When ` PYTHON ` is not specified, pycall.rb tries to use ` python3 ` first,
71
+ and then tries to use ` python ` .
72
+
64
73
### Releasing the RubyVM GVL during Python function calls
65
74
66
75
You may want to release the RubyVM GVL when you call a Python function that takes very long runtime.
@@ -119,13 +128,7 @@ variable `@__pyptr__`. `PyCall::PyObjectWrapper` assumes the existance of
119
128
system and Python object system. For example, ` PyCall::PyObjectWrapper `
120
129
translates Ruby's coerce system into Python's swapped operation protocol.
121
130
122
- ### Specifying the Python version
123
-
124
- If you want to use a specific version of Python instead of the default,
125
- you can change the Python version by setting the ` PYTHON ` environment variable
126
- to the path of the ` python ` executable.
127
-
128
- ### Deploying on Heroku
131
+ ## Deploying on Heroku
129
132
130
133
Heroku's default version of Python is not compiled with the ` --enabled-shared `
131
134
option and can't be accessed by PyCall. Alternative [ buildpacks] ( https://devcenter.heroku.com/articles/buildpacks ) are available,
0 commit comments