Search code examples
pythonwasm-packemsdk

issue with emsdk on mac


I am trying to setup emsdk on mac with the following command:

./emsdk install latest

I cloned the repo from git. However, I get the following error upon running the command mentioned above:

** NOTICE **: The default SDK changed from `fastcomp` to `upstream`.
If you have problems, or wish to revert back to fastcomp for some other reason
you can add `-fastcomp` to explicitly install that fastcomp-based
SDK, .e.g ./emsdk install latest-fastcomp.

Installing SDK 'sdk-releases-upstream-b024b71038d1291ed7ec23ecd553bf2c0c8d6da6-64bit'..
Installing tool 'releases-upstream-b024b71038d1291ed7ec23ecd553bf2c0c8d6da6-64bit'..
Error: Downloading URL 'https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/b024b71038d1291ed7ec23ecd553bf2c0c8d6da6/wasm-binaries.tbz2': <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
Warning: Possibly SSL/TLS issue. Update or install Python SSL root certificates (2048-bit or greater) supplied in Python folder or https://pypi.org/project/certifi/ and try again.
Installation failed!

I have tried running the following to fix this but it did not solve the issue.

pip install certifi

Any other suggestions to fix the issue would be quite welcome.


Solution

  • I was able to upgrade the python version to 3.8.0 using pyenv. The upgrade helped me with the certificate issue.

    brew install pyenv
    pyenv install 3.8.0
    
    pyenv global 3.8.0 
    

    or if inside the emsdk directory:

    pyenv local 3.8.0
    

    The command ./emsdk install latest ran successfully after the python upgrade.