1

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.

ali haider
  • 19,175
  • 17
  • 80
  • 149

2 Answers2

0

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.

ali haider
  • 19,175
  • 17
  • 80
  • 149
0

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.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 22 '23 at 00:30