No module named tools

1,755 views
Skip to first unread message

Samir Sabri

unread,
Jun 29, 2015, 2:03:34 AM6/29/15
to emscripte...@googlegroups.com
I have installed emscripten on Mac OSX using Portable Emscripten SDK for Linux and OS X, after following the instructions of installation, when I run:

$ ./emcc -v
I get this error:

Traceback (most recent call last):

  File "./emcc", line 52, in <module>

    from tools import shared, jsrun, system_libs

ImportError: No module named tools

How can I solve this problem?

Alon Zakai

unread,
Jun 29, 2015, 1:39:08 PM6/29/15
to emscripte...@googlegroups.com
There should be a directory called "tools" at the top of the emscripten installation. Is it not there?


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Samir Sabri

unread,
Jun 29, 2015, 4:38:31 PM6/29/15
to emscripte...@googlegroups.com

No, there is no directory called "tools" at where emcc exists, ( at the top of the emscripten installation)

> You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

Alon Zakai

unread,
Jun 29, 2015, 4:54:56 PM6/29/15
to emscripte...@googlegroups.com
It should look similar to the files in

https://github.com/kripken/emscripten

are none of those there? Perhaps try installing from scratch.

Samir Sabri

unread,
Jul 3, 2015, 9:07:47 PM7/3/15
to emscripte...@googlegroups.com
It looks like the attached image, but how to include missing folders?
--
Kind Regards,
--------------------------------------------- 
Samir Sabri
Software Architect& Developer
Jordan-Middle East
Screen Shot 2015-07-04 at 4.04.59 AM.png

Floh

unread,
Jul 4, 2015, 6:02:12 AM7/4/15
to emscripte...@googlegroups.com
There are 2 directories missing: 'third_party' and 'tools'. Did you try to re-download and install everything from scratch? Since it looks something went wrong during installation.

Cheers,
-Floh.


Am Samstag, 4. Juli 2015 03:07:47 UTC+2 schrieb Samir Sabri:
It looks like the attached image, but how to include missing folders?
On Mon, Jun 29, 2015 at 11:54 PM, Alon Zakai <alon...@gmail.com> wrote:
It should look similar to the files in

https://github.com/kripken/emscripten

are none of those there? Perhaps try installing from scratch.

On Mon, Jun 29, 2015 at 1:38 PM, Samir Sabri <as3...@gmail.com> wrote:

No, there is no directory called "tools" at where emcc exists, ( at the top of the emscripten installation)

On Jun 29, 2015 8:39 PM, "Alon Zakai" <alon...@gmail.com> wrote:
>
> There should be a directory called "tools" at the top of the emscripten installation. Is it not there?
>
>
> On Sun, Jun 28, 2015 at 11:03 PM, Samir Sabri <as3...@gmail.com> wrote:
>>
>> I have installed emscripten on Mac OSX using Portable Emscripten SDK for Linux and OS X, after following the instructions of installation, when I run:
>>
>> $ ./emcc -v
>>
>> I get this error:
>>
>> Traceback (most recent call last):
>>
>>   File "./emcc", line 52, in <module>
>>
>>     from tools import shared, jsrun, system_libs
>>
>> ImportError: No module named tools
>>
>> How can I solve this problem?
>>
>>
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Samir Sabri

unread,
Jul 4, 2015, 9:53:03 PM7/4/15
to emscripte...@googlegroups.com
Thanks Floh, I've tried to install it again, but I've got "Permission denied" error, here is my log:

$ sudo ./emsdk install latest

Installing SDK 'sdk-tag-1.34.1-64bit'..

Installing tool 'clang-tag-e1.34.1-64bit'..

File '/Users/Apple/Downloads/emsdk_portable 2/zips/llvm-e1.34.1.tar.gz' already downloaded, skipping.

 Unpacking '/Users/Apple/Downloads/emsdk_portable 2/zips/llvm-e1.34.1.tar.gz' to '/Users/Apple/Downloads/emsdk_portable 2/clang/tag-e1.34.1/src'

..

..

..

..

Running CMake: ['cmake', '-G', 'Unix Makefiles', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DPYTHON_EXECUTABLE=/usr/bin/python', '-DLLVM_TARGETS_TO_BUILD=X86;JSBackend', '-DLLVM_INCLUDE_EXAMPLES=OFF', '-DLLVM_INCLUDE_TESTS=OFF', '-DCLANG_INCLUDE_EXAMPLES=OFF', '-DCLANG_INCLUDE_TESTS=OFF', '/Users/Apple/Downloads/emsdk_portable 2/clang/tag-e1.34.1/src']

Traceback (most recent call last):

  File "./emsdk", line 1734, in <module>

    sys.exit(main())

  File "./emsdk", line 1717, in main

    success = tool.install()

  File "./emsdk", line 1007, in install

    success = tool.install()

  File "./emsdk", line 1016, in install

    success = build_fastcomp_tool(self)

  File "./emsdk", line 611, in build_fastcomp_tool

    '-DLLVM_INCLUDE_EXAMPLES=OFF', '-DLLVM_INCLUDE_TESTS=OFF', '-DCLANG_INCLUDE_EXAMPLES=OFF', '-DCLANG_INCLUDE_TESTS=OFF'])

  File "./emsdk", line 559, in cmake_configure

    ret = subprocess.check_call(cmdline, cwd=build_root)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call

    retcode = call(*popenargs, **kwargs)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call

    return Popen(*popenargs, **kwargs).wait()

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in __init__

    errread, errwrite)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child

    raise child_exception

OSError: [Errno 13] Permission denied

Floh

unread,
Jul 5, 2015, 5:50:51 AM7/5/15
to emscripte...@googlegroups.com
You shouldn't need to run anything with 'sudo', normal user permissions are good enough since everything is installed locally for the current user. You should delete old files (e.g. all downloaded tgz files) to make sure there re-downloaded. You also should make sure that a recent cmake version is installed (for instance with 'brew install cmake'), and that python version 2.7.x is installed (should be default on Mac), for the system-default clang, this doesn't have to be the latest version (I'm running beta OS 10.11 and Xcode7):

> cd ~
> clang --version
Apple LLVM version 7.0.0 (clang-700.0.53)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
> cmake --version
cmake version 3.2.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
> python --version
Python 2.7.10
> curl -O https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
> tar -xvf emsdk-portable.tar.gz
> cd emsdk_portable
> ./emsdk install sdk-tag-1.34.0-64bit
...downloading and compiling will take 15..45 minutes...
> ./emsdk activate sdk-tag-1.34.0-64bit

...this should get you started, next you can either add the location for emcc to your shell's path, or use the absolute path to 'emcc' in your build scripts.

In my quick attempts I couldn't get the emsdk_env.sh script to set the path to emcc as described in the installation instructions on OSX, may be because I'm running a non-standard shell (fish instead of bash), but if you're using absolute paths to emcc this isn't necessary.

Good luck :)
-Floh

Samir Sabri

unread,
Jul 6, 2015, 12:20:51 AM7/6/15
to emscripte...@googlegroups.com
Thanks Floh! now, I can see the result of emcc -v as:

$ emcc -v
INFO     root: (Emscripten: Running sanity checks)
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.34.1
clang version 3.7.0
Target: x86_64-apple-darwin14.1.0
Thread model: posix
INFO     root: (Emscripten: Running sanity checks)

AM I ready to get started? is my clang a bit old? if so, do I have to update it? how would I?





>> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Kind Regards,
--------------------------------------------- 
Samir Sabri
Software Architect& Developer
Jordan-Middle East

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Floh

unread,
Jul 6, 2015, 3:11:32 AM7/6/15
to emscripte...@googlegroups.com
Looks good to me I think you're ready to go, 'clang version 3.7.0' is the proper, current clang version used for the emscripten backend, the '7.0.0' version is Apple's native system compiler.

For a simple test you could write a small helloworld sample (with the usual main() and printf()), compile it with:

> emcc hello.c -o hello.html

Then run a local web server in the local directory:

> python -m SimpleHTTPServer

...and in a browser, navigate to http::/localhost:8000/hello.html, you should see the standard emscripten shell webpage, with a "Hello World!" in a black text field. If this works you're ready for the more complex stuff :)

Cheers,
-Floh
>> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Kind Regards,
--------------------------------------------- 
Samir Sabri
Software Architect& Developer
Jordan-Middle East

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Samir Sabri

unread,
Jul 6, 2015, 11:31:45 PM7/6/15
to emscripte...@googlegroups.com
Thanks Floh for your support, now I am on my way toward great innovations ;-)

Regards,
- Samir

>> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Kind Regards,
--------------------------------------------- 
Samir Sabri
Software Architect& Developer
Jordan-Middle East

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Kind Regards,
--------------------------------------------- 
Samir Sabri
Software Architect& Developer
Jordan-Middle East

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/W6uok7SBQLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages