"Seeking assistance with a Python version compatibility error during Meteor 2.13 deployment using Node.js v14.21.3, npm v6.14.17, and Mup. Any experienced users familiar with these versions, your insights would be greatly appreciated. Thank you!"

“Hello everyone,
I’m currently facing an issue with preparing the bundle for deployment. Here are the details of my environment:

  • Meteor version: 2.13
  • Node.js version: v14.21.3
  • npm version: 6.14.17
  • Deployment tool: Mup

The specific error message I’m encountering is related to Python version compatibility during the bundling process:------------------------------------STDERR------------------------------------
------------------------------------STDOUT------------------------------------
sion is “2.7.13”
gyp ERR! find Python - version is 2.7.13 - should be >=3.6.0
gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python=“/path/to/pythonexecutable”
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python “/path/to/pythonexecutable”
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool tried various solutions, including updating Python and configuring node-gyp and npm, but haven’t been able to resolve the issue. Since I’m using Meteor 2.13, Node.js v14.21.3, npm v6.14.17, and Mup for deployment, I believe there might be a specific configuration or workaround needed in this context.
Could someone experienced with these versions and Mup assist me in troubleshooting this problem? Your expertise would be immensely valuable.

Is this just about that python is not found? Usually I symlink it to python3.

sudo su

cd /usr/bin

ln -s /usr/bin/python3 python

For example about how to build with Meteor, look at rebuild-wekan.sh at GitHub - wekan/wekan: The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://app.transifex.com/wekan/ only.

Or alternatively, with Docker, look at Dockerfile and docker-compose.yml at GitHub - wekan/wekan: The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://app.transifex.com/wekan/ only.

You can compare your dependency versions to those that are at wekan/.meteor/packages , wekan/.meteor/versions , wekan/.meteor/release , wekan/package.json . To your files, change to those newest versions that use Meteor 2.13.3 , and rebuild, like with rebuild-wekan.sh . main branch is using Meteor 2.13.3 , it is currently working. That other branch is for Meteor 3 alpha 17 upgrades, there not all dependencies work yet. So these at repo GitHub - wekan/wekan: The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://app.transifex.com/wekan/ only. . I usually build at Debian 12 or newest Ubuntu. There are also build bundle scripts that change amd64 bundle, generating bundles for arm64, s390x, windows, etc, more info about those at Raspberry Pi · wekan/wekan Wiki · GitHub . Or for Windows, install info is at Offline · wekan/wekan Wiki · GitHub . Mac info at Mac · wekan/wekan Wiki · GitHub .

which python3
python3 --version

/Users/merg/.pyenv/shims/python3
Python 3.12.0

So is this for Mac M1/M2 ? Did you install Rosetta2 ?

If you need different version of Python, search for it with homebrew:

brew search python

And then install it with that python package name, for example:

brew install python3

Then, if it shows some commands to make it default, run them, or add them to .zshrc, at your home directory:

nano .zshrc

I actually just worked through this issue myself. Since you are using MUP you just need to use the docker.buildInstructions configuration to run some additional setup.

      buildInstructions: [
        'USER root',
        'RUN apt-get update && apt-get install -y python3',
        'USER app'
      ],

I am currently using a Mac M1 and have Rosetta 2 installed on my system.

You’re not deploying to Mac though. Python needs to be available on the server where you deploy the app to. Since you are using mup, you can use the docker build instructions to install python 3 when it builds your new docker image.

https://meteor-up.com/docs#docker-options

Thank you for your assistance, @copleykj! I wanted to update you on the issue I was facing. It turns out, I was able to resolve the problem by removing the unnecessary packages, specifically “node-sass”: “^9.0.0” and “node-sass-middleware”: “^1.1.0”, from the package.json file. This resolved the (gyp ERR! find Python - version is 2.7.13 - should be >=3.6.0 gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED) error. Your support was invaluable, and I truly appreciate your help. Thank you once again for your time and guidance!

1 Like

@gaurav09112014 if you think this issue is solved, then please add [solved] to the title so others with the same issue can immediately see there is already a solution. :slight_smile: