rules
rules copied to clipboard
Python2.7 EOL is approaching, but cannot npm install without it
When attempting to run npm install durable on Ubuntu 18, I get the following error:
gyp ERR! find Python You need to install the latest version of Python 2.7.
With Python 2.7 hitting EOL in a little over two months: https://pythonclock.org/, I don't really want to have to install that on our production servers. Python 3 should work, except then I get this error:
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - executable path is "/usr/bin/python"
gyp ERR! find Python - version is "3.6.8"
gyp ERR! find Python - version is 3.6.8 - should be >=2.6.0 <3.0.0
gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
The version of node-gyp specified in package.json is ^3.8.0, but the latest version of node-gyp available is 6.0.0, and it supports versions of Python up to 3.7, so unless there's some Python2.7-specific build code being used, perhaps that's a simple way to get it installed on modern systems?
Hi Dan, thanks for raising the issue. There is nothing specific to Python 2.7 in the npm package. I will provide a fix for this issue within the next couple of days.
@DanHulton Just create a python3 virtualenv and install it inside there
I saw the new release with the updated version of node-gyp and attempted to install it, but it still fails, with confusing output:
npm ERR! Failed at the [email protected] install script.
So it’s installing a version that has the fix in it. But:
gyp ERR! node-gyp -v v5.0.3
And the package.json has:
"node-gyp": "^6.0.0"
So it looks like it's still using an older version of node-gyp for trying to install.