MacOS – EMSCRIPTEN Python2 Not Found

About Monkey 2 Forums Monkey 2 Programming Help MacOS – EMSCRIPTEN Python2 Not Found

This topic contains 10 replies, has 5 voices, and was last updated by  APC 2 years, 3 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #5994

    APC
    Participant

    Hello Mark,

    I installed Monkey2-v1.0.02 on my Mac Book Pro running MacOS Sierra 10.12.2, when I build EMSCRIPTEN I get the following error:

    env: python2: No such file or directory

    MacOS Sierra comes with python installed by default and I have this version:

    Python 2.7.10 (default, Jul 30 2016, 19:40:32)

    [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin

    Type “help”, “copyright”, “credits” or “license” for more information.

    >>>

    Here is the entire Build Error

    Parsing…
    Semanting…
    Translating…
    Compiling…
    Build error: System command ’em++ -I”/Applications/Monkey2-v1.1.02/modules/” -I”/Applications/Monkey2-v1.1.02/modules/monkey/native” -std=c++11 -s USE_SDL=2 -s TOTAL_MEMORY=67108864 -s DISABLE_EXCEPTION_CATCHING=1 -O3 -c -o “/Applications/Monkey2-v1.1.02/modules/monkey/monkey.buildv1.1.02/emscripten_release/build/_1src_2monkey_0monkey.cpp.o” “/Applications/Monkey2-v1.1.02/modules/monkey/monkey.buildv1.1.02/emscripten_release/src/monkey_monkey.cpp”‘ failed.

    em++ -I”/Applications/Monkey2-v1.1.02/modules/” -I”/Applications/Monkey2-v1.1.02/modules/monkey/native” -std=c++11 -s USE_SDL=2 -s TOTAL_MEMORY=67108864 -s DISABLE_EXCEPTION_CATCHING=1 -O3 -c -o “/Applications/Monkey2-v1.1.02/modules/monkey/monkey.buildv1.1.02/emscripten_release/build/_1src_2monkey_0monkey.cpp.o” “/Applications/Monkey2-v1.1.02/modules/monkey/monkey.buildv1.1.02/emscripten_release/src/monkey_monkey.cpp”

    env: python2: No such file or directory
    ***** Fatal mx2cc error *****

    Internal mx2cc build error

    Build modules failed.

    #6002

    codifies
    Participant

    silly thought (not used a mac in anger) but it’s not failing to find env is it….

    #6188

    APC
    Participant

    I still have this issue ” env: python2: No such file or directory”

    Can somebody help me ?

    #6189

    Jesse
    Participant

    Do you have the latest Xcode and developer tools installed?

    check if there is a python folder in your applications folder.

    if you are not sure the developer tools are installed, try this to attempt and install the developer tools:

    xcode-select —install

    it will tell you if they are installed or not.

    or you might want to manually install python:

    https://docs.python.org/3/using/mac.html

    #6190

    Ethernaut
    Participant

    You have to change the paths in monkey2/bin/env_macos.txt.

    That said, I did change the paths and was still getting that error. Then I solved it the “easy” way: reinstalled emscripten using the default path that Monkey2 expects to find (which is /Users/YourUserName/emsdk).

    Cheers.

    #6215

    APC
    Participant

    Ethernaut,

    I did reinstalled EMSCRIPTEN using the /Users/YourUserName/emsdk path.

    I still getting the same error, my python is installed in the /usr/bin/python and I also have two other versions that came with  Mac OS Sierra /usr/bin/python2.6 and /usr/bin/python2.7

    This error env: python2: No such file or directory, the env is set in the mx2cc.monkey2 and it is reading the file env_macos.txt I just don’t know where the “python2” is comming from?

     

    This is very frustrating! I have EMSCRIPTEN working on Windows and I can’t get it to work on MacOS

    #6216

    Jesse
    Participant

    why don’t you install the monkey2 in the default home directory no the applications directory. It should stop all your problems.

    #6217

    APC
    Participant

    Jesse what is the Monkey2 default home directory?

    #6218

    Jesse
    Participant

    Its the administrator home folder. The one for my Macbook Pro is MBP/users/legend as my administrator account is legend and that is where I have the monkey2 folder. /users/yourusersname folder is your home folder.

    #6221

    Mark Sibly
    Keymaster

    On macos, I think if you install emscripten to ~/emsdk, it should all ‘just work’ as this is where env_macos.txt expects to find it. Note that emscripten also requires python2, but apple did something to PATH in El Capitan that stopped it finding python2 via emscripten’s interrnal PATH. To get around this, I had to add this to bin/env_macos.txt – make sure you have it too (you should have so I’m guessing the problem is not that):

    PATH=/usr/local/bin:${PATH}

    In general, I don’t want to get too caught up with being responsible for the installation of (non-desktop) SDKs. I mean, feel free to ask and discuss here, but also be ready to do some googling etc if I/we can’t help or you could be waiting forever! This is esp. true of emscripten which is kind of ‘bleeding edge’ and is a pretty big/complex project. If you go for 3rd party help though, you might want to try and get an mx2-less hello_world.cpp working first (see download page I think) – if you can do that but mx2cc still doesn’t work, then it *is* my problem!

    I’ve found the emscripten google group to be a good place to get help with installation and building emscripten from source. And the authors post there too, so if you discover an installer bug it can get fixed in the release!

    #6232

    APC
    Participant

    I finally got it working on MacOS!

    For some weird reason ./emsdk install latest was not downloading the entire emscripten-clang_e1.35.0.tar.gz!

    I found out doing a sanity check  ./emcc -v.

    emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.35.0

    clang version 3.7.0 (https://github.com/kripken/emscripten-fastcomp-clang dbe68fecd03d6f646bd075963c3cc0e7130e5767) (https://github.com/kripken/emscripten-fastcomp 4e83be90903250ec5142edc57971ed4c633c5e25)

    Target: x86_64-apple-darwin16.3.0

    Thread model: posix

    INFO:root:(Emscripten: Running sanity checks)

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.