Hello, I am trying to set my python version to a newer version since my current project requires a version higher than 3.8 but it’s currently stuck with 3.7.3
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
Hence why I am getting the following error:
Traceback (most recent call last):
File "/usr/lib/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
import gyp # noqa: E402
File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
import gyp.input
File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 8, in <module>
import gyp.common
File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 435
if CC := os.environ.get("CC_target") or os.environ.get("CC"):
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/node-gyp/lib/configure.js:317:18)
gyp ERR! stack at ChildProcess.emit (node:events:519:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Linux 6.5.0-1021-aws
gyp ERR! command "/opt/render/project/nodes/node-21.7.2/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/render/project/src/node_modules/sharp
gyp ERR! node -v v21.7.2
gyp ERR! node-gyp -v v10.2.0
gyp ERR! not ok
is there a way to specify Python version in node runtimes? I read on a previous community topic that the PYTHON_VERSION environment variable does not work with node environments.
edit: I have also tried creating a new static website to see if render updated the python version on newer websites but it still used 3.7.3