yeoman/generator-webapp

Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'

WebKieth opened this issue · 2 comments

yo 2.0.5
webapp latest.
After installing all packages try to gulp serve and get this error.
OS xubuntu 18.04
python 3.6
node 8.15.1
Full error:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f5cf1ad1740 (most recent call first):
Aborted (core dumped)

I tried to reconfigure python - it didnt help

lol, one minute after opening issue and i solve it.
sudo npm i gulp -g
I needed to install gulp globally - maybe you will white it to readme?. It's just a luck. This error didnt talk any helpfull info about that.

Thanks for reporting the error and writing down your solution, hopefully people experiencing the same will be able to find this on Google.

I'm not sure whether you were using the latest prerelease, i.e. v4 or v3. In v4 you don't have to have gulp globally installed, so globally reinstalling gulp shouldn't had made a difference in your case (if you were using v4), instead you run locally installed gulp through npm scripts. In any case, this error isn't really actionable yet because I don't know how to reproduce it, let alone debug it. But feel free to talk about it some more, to provide more info.

To those who are also experiencing this: please comment that you're also experiencing this bug. That way you'll confirm that this is not an unfortunate one-time bug and we can try to fix it.