issue with emsdk on mac

2.1k Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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.

1
On

In fact, this error is caused by a python error. So, you can only modify the python script file: emsdk.py, add following two lines to resolve this error:

import ssl

ssl._create_default_https_context = ssl._create_unverified_context

A hint: you must insert above two lines before any function definition.