-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError from import os
in gyp_main.py
#3073
Comments
I'm still running into this. It looks like the immediate source of the error is this:
It's somehow ended up duplicating the first two args, which means it's trying to use I noticed that if I run |
In my case the problem was missing build-tools which in turn failed to install because of missing python2 (outdated years ago, but still used by node-gyp's dependencies). Try running Or to keep your system clean of outdated junk like python2, install Docker and use node image already bundled with python2: (run from root directory of your project with package.json)
This will install your dependencies. |
Please note that
Agreed. Python 2 died 1,799 days ago on 1/1/2020 so there should be no software still using it. The log seems to point to a failure in https://www.npmjs.com/package/node-gyp-build Can anyone create a GitHub Action or a Docker container that exhibits this behavior? |
sure, you are right. I know this line is valid in python3 as well. But the problem somehow boiled down to missing python2 in my system, apparently because node-gyp needs it. Fairly, I did not make research yet on the chain of problems leading to this strange manifestation. Here is what I get trying to build i2c-bus on my system
|
|
Verbose output (from npm or node-gyp):
I'm getting a very confusing error trying to install a package from GitHub, verbose output above, but I see this in the middle of it:
Now obviously that's completely valid Python, so something else is going on -- but I have no idea where to even begin
The text was updated successfully, but these errors were encountered: