-
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
ImportError: No module named gyp on Cygwin/Windows #1782
Comments
Update: I was able to successfully complete the build. For all those interested this document/repo details how I was able to fix things. |
K, I'll leave this open for a bit longer in case one of our windows experts has the bandwidth to have a look and has some idea, be warned that there's limited bandwidth available around here and it's not uncommon for more obscure issues to go unanswered. Mostly this issue tracker is a cross-your-fingers kind of deal. |
From the linked code fix I would guess under Cygwin sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'pylib')) will fix this? @joquijada I don't have Cygwin, could you test this? This also would be a nice first PR :) |
@bzoz Certainly, will try it out and will reply, EOW at the latest. Thanks a lot. |
@bzoz Tried the change, but the absolute path it's building points to
Should we just try using the relative path ( Thanks. |
Ok, so I've found this on StackOverflow: https://stackoverflow.com/questions/3718657/how-to-properly-determine-current-script-directory. Looks like the correct way to get the script path is: os.path.dirname(os.path.abspath(__file__)) So, can you try this: sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pylib')) |
@joquijada did you try those changes? |
@bzoz Not yet, will try by Friday, thanks. |
@bzoz I did further research as well, and found this: https://trac.sagemath.org/ticket/25811. It looks like the Perhaps we need to give Python a "little help" dealing with Windows paths properly in a Cygwin environment. I was thinking of using command
and outputs
The Angular CLI /cygdrive/c/Users/v094303/AppData/Roaming/npm/ng:
I can try out my solution and create a PR. Below is more debug statements I added in the log to help me analyze.
|
I really don't have any idea how Cygwin works. But if you make a PR, we can run it through CI, I can give it a spin locally, and hopefully, we can get this issue solved. |
…vironments Addresses nodejs#1782
…ronments Addresses nodejs#1782
…ronments Addresses nodejs#1782
Keep getting below error when I run
npm install --verbose
to install my Node.js application, which is indirectly usingnode-gyp
to compilere2
module. I've followed guidelines hereMicrosoft Windows 10 Enterprise
Desktop development with C++" workload
re2
moduleVerbose output from `npm install --verbose` command:
My
npm config list
settings:The text was updated successfully, but these errors were encountered: