#37 new
Robin Winsor

Trouble installing on Mac OS X 10.8

Reported by Robin Winsor | September 16th, 2012 @ 10:46 PM

I've gone through what appears to be a lengthy installation process but I still get an error of
Import error: No module named spidermonkey
I've never had to do more than

sudo python setup.py install

before so this has been very much more complex. Forgive the verbosity but the following seems like it might give a clue to someone more knowledgable than I as to what is going on... Any advice (in very simple terms - I'm a rookie at this) would be much appreciated.

robin-winsors-imac-2:downloads robin$ cd davisp-python-spidermonkey-6e3d647
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ sudo python setup.py install
Password:
Traceback (most recent call last):
File "setup.py", line 186, in

**platform_config()

File "setup.py", line 143, in platform_config

return nspr_config(config=config)

File "setup.py", line 87, in nspr_config

return pkg_config("nspr", config)

File "setup.py", line 59, in pkg_config

raise RuntimeError("No package configuration found for: %s" % pkg_name)

RuntimeError: No package configuration found for: nspr
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ ls
LICENSE THANKS ez_setup.pyc setup.py update-libjs.sh
MANIFEST.in extra go spidermonkey
README.md ez_setup.py go.comm tests
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ $ sudo port install pkgconfig
-bash: $: command not found robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ python ex_setup.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'ex_setup.py': [Errno 2] No such file or directory robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ python ez_setup.py
Setuptools version 0.6c9 or greater has been installed.
(Run "ez_setup.py -U setuptools" to reinstall or upgrade.) robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 186, in

**platform_config()

File "setup.py", line 143, in platform_config

return nspr_config(config=config)

File "setup.py", line 87, in nspr_config

return pkg_config("nspr", config)

File "setup.py", line 59, in pkg_config

raise RuntimeError("No package configuration found for: %s" % pkg_name)

RuntimeError: No package configuration found for: nspr
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ python ez_setup.py -U setuptools
Searching for setuptools
Reading http://pypi.python.org/simple/setuptools/
Reading http://peak.telecommunity.com/snapshots/
Best match: setuptools 0.6c12dev-r88846
Downloading http://peak.telecommunity.com/snapshots/setuptools-0.6c12dev_r88846...
Processing setuptools-0.6c12dev_r88846-py2.7.egg
Moving setuptools-0.6c12dev_r88846-py2.7.egg to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Removing setuptools 0.6c11 from easy-install.pth file
Adding setuptools 0.6c12dev-r88846 to easy-install.pth file
error: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/easy-install.pth: Permission denied
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ sudo python ez_setup.py -U setuptools
Password:
Searching for setuptools
Reading http://pypi.python.org/simple/setuptools/
Reading http://peak.telecommunity.com/snapshots/
Best match: setuptools 0.6c12dev-r88846
Downloading http://peak.telecommunity.com/snapshots/setuptools-0.6c12dev_r88846...
Processing setuptools-0.6c12dev_r88846-py2.7.egg
Removing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c12dev_r88846-py2.7.egg
Moving setuptools-0.6c12dev_r88846-py2.7.egg to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Removing setuptools 0.6c11 from easy-install.pth file
Adding setuptools 0.6c12dev-r88846 to easy-install.pth file
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Installing easy_install-2.7 script to /Library/Frameworks/Python.framework/Versions/2.7/bin

Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c12dev_r88846-py2.7.egg
Processing dependencies for setuptools
Finished processing dependencies for setuptools
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ sudo python ez_setup.py
Setuptools version 0.6c9 or greater has been installed.
(Run "ez_setup.py -U setuptools" to reinstall or upgrade.) robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 186, in

**platform_config()

File "setup.py", line 143, in platform_config

return nspr_config(config=config)

File "setup.py", line 87, in nspr_config

return pkg_config("nspr", config)

File "setup.py", line 59, in pkg_config

raise RuntimeError("No package configuration found for: %s" % pkg_name)

RuntimeError: No package configuration found for: nspr
robin-winsors-imac-2:davisp-python-spidermonkey-6e3d647 robin$ sudo port install pkgconfig
---> Computing dependencies for pkgconfig ---> Dependencies to be installed: glib2 gettext expat libiconv gperf ncurses libffi perl5 perl5.12 gdbm xz zlib ---> Fetching archive for expat ---> Attempting to fetch expat-2.1.0_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/expat ---> Attempting to fetch expat-2.1.0_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/expat ---> Attempting to fetch expat-2.1.0_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/expat ---> Fetching distfiles for expat ---> Attempting to fetch expat-2.1.0.tar.gz from http://cdnetworks-us-2.dl.sourceforge.net/project/expat/expat/2.1.0 ---> Verifying checksum(s) for expat ---> Extracting expat ---> Configuring expat ---> Building expat ---> Staging expat into destroot ---> Installing expat @2.1.0_0 ---> Activating expat @2.1.0_0 ---> Cleaning expat ---> Fetching archive for gperf ---> Attempting to fetch gperf-3.0.4_2.darwin_12.x86_64.tbz2 from http://packages.macports.org/gperf ---> Attempting to fetch gperf-3.0.4_2.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/gperf ---> Attempting to fetch gperf-3.0.4_2.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gperf ---> Fetching distfiles for gperf ---> Attempting to fetch gperf-3.0.4.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/gperf ---> Verifying checksum(s) for gperf ---> Extracting gperf ---> Applying patches to gperf ---> Configuring gperf ---> Building gperf ---> Staging gperf into destroot ---> Installing gperf @3.0.4_2 ---> Activating gperf @3.0.4_2 ---> Cleaning gperf ---> Fetching archive for libiconv ---> Attempting to fetch libiconv-1.14_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/libiconv ---> Attempting to fetch libiconv-1.14_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/libiconv ---> Attempting to fetch libiconv-1.14_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/lib... ---> Fetching distfiles for libiconv ---> Attempting to fetch libiconv-1.14.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv ---> Staging libiconv into destroot ---> Installing libiconv @1.14_0 ---> Activating libiconv @1.14_0 ---> Cleaning libiconv ---> Fetching archive for ncurses ---> Attempting to fetch ncurses-5.9_1.darwin_12.x86_64.tbz2 from http://packages.macports.org/ncurses ---> Attempting to fetch ncurses-5.9_1.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/ncurses ---> Attempting to fetch ncurses-5.9_1.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/ncu... ---> Fetching distfiles for ncurses ---> Attempting to fetch ncurses-5.9.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/ncurses ---> Verifying checksum(s) for ncurses ---> Extracting ncurses ---> Applying patches to ncurses ---> Configuring ncurses ---> Building ncurses ---> Staging ncurses into destroot ---> Installing ncurses @5.9_1 ---> Activating ncurses @5.9_1 ---> Cleaning ncurses ---> Fetching archive for gettext ---> Attempting to fetch gettext-0.18.1.1_2.darwin_12.x86_64.tbz2 from http://packages.macports.org/gettext ---> Attempting to fetch gettext-0.18.1.1_2.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/gettext ---> Attempting to fetch gettext-0.18.1.1_2.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/get... ---> Fetching distfiles for gettext ---> Attempting to fetch gettext-0.18.1.1.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/gettext ---> Verifying checksum(s) for gettext ---> Extracting gettext ---> Applying patches to gettext ---> Configuring gettext ---> Building gettext ---> Staging gettext into destroot ---> Installing gettext @0.18.1.1_2 ---> Activating gettext @0.18.1.1_2 ---> Cleaning gettext ---> Fetching archive for libffi ---> Attempting to fetch libffi-3.0.11_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/libffi ---> Attempting to fetch libffi-3.0.11_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/libffi ---> Attempting to fetch libffi-3.0.11_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/libffi ---> Fetching distfiles for libffi ---> Attempting to fetch libffi-3.0.11.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/libffi ---> Verifying checksum(s) for libffi ---> Extracting libffi ---> Configuring libffi ---> Building libffi ---> Staging libffi into destroot ---> Installing libffi @3.0.11_0 ---> Activating libffi @3.0.11_0 ---> Cleaning libffi ---> Fetching archive for gdbm ---> Attempting to fetch gdbm-1.10_2.darwin_12.x86_64.tbz2 from http://packages.macports.org/gdbm ---> Attempting to fetch gdbm-1.10_2.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/gdbm ---> Attempting to fetch gdbm-1.10_2.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gdbm ---> Fetching distfiles for gdbm ---> Attempting to fetch gdbm-1.10.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/gdbm ---> Verifying checksum(s) for gdbm ---> Extracting gdbm ---> Configuring gdbm ---> Building gdbm ---> Staging gdbm into destroot ---> Installing gdbm @1.10_2 ---> Activating gdbm @1.10_2 ---> Cleaning gdbm ---> Fetching archive for perl5.12 ---> Attempting to fetch perl5.12-5.12.4_1.darwin_12.x86_64.tbz2 from http://packages.macports.org/perl5.12 ---> Attempting to fetch perl5.12-5.12.4_1.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/perl5.12 ---> Attempting to fetch perl5.12-5.12.4_1.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/per... ---> Fetching distfiles for perl5.12 ---> Attempting to fetch perl-5.12.4.tar.bz2 from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/perl5.12 ---> Verifying checksum(s) for perl5.12 ---> Extracting perl5.12 ---> Applying patches to perl5.12 ---> Configuring perl5.12 ---> Building perl5.12 ---> Staging perl5.12 into destroot ---> Installing perl5.12 @5.12.4_1 ---> Activating perl5.12 @5.12.4_1 ---> Cleaning perl5.12 ---> Fetching archive for perl5 ---> Attempting to fetch perl5-5.12.4_0+perl5_12.darwin_12.noarch.tbz2 from http://packages.macports.org/perl5 ---> Attempting to fetch perl5-5.12.4_0+perl5_12.darwin_12.noarch.tbz2 from http://lil.fr.packages.macports.org/perl5 ---> Attempting to fetch perl5-5.12.4_0+perl5_12.darwin_12.noarch.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/perl5 ---> Fetching distfiles for perl5 ---> Verifying checksum(s) for perl5 ---> Extracting perl5 ---> Configuring perl5 ---> Building perl5 ---> Staging perl5 into destroot ---> Installing perl5 @5.12.4_0+perl5_12 ---> Activating perl5 @5.12.4_0+perl5_12 ---> Cleaning perl5 ---> Fetching archive for xz ---> Attempting to fetch xz-5.0.4_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/xz ---> Attempting to fetch xz-5.0.4_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/xz ---> Attempting to fetch xz-5.0.4_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/xz ---> Fetching distfiles for xz ---> Attempting to fetch xz-5.0.4.tar.bz2 from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/xz ---> Verifying checksum(s) for xz ---> Extracting xz ---> Configuring xz ---> Building xz ---> Staging xz into destroot ---> Installing xz @5.0.4_0 ---> Activating xz @5.0.4_0 ---> Cleaning xz ---> Fetching archive for zlib ---> Attempting to fetch zlib-1.2.7_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/zlib ---> Attempting to fetch zlib-1.2.7_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/zlib ---> Attempting to fetch zlib-1.2.7_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/zlib ---> Fetching distfiles for zlib ---> Attempting to fetch zlib-1.2.7.tar.bz2 from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/zlib ---> Verifying checksum(s) for zlib ---> Extracting zlib ---> Configuring zlib ---> Building zlib ---> Staging zlib into destroot ---> Installing zlib @1.2.7_0 ---> Activating zlib @1.2.7_0 ---> Cleaning zlib ---> Fetching archive for glib2 ---> Attempting to fetch glib2-2.32.4_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/glib2 ---> Attempting to fetch glib2-2.32.4_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/glib2 ---> Attempting to fetch glib2-2.32.4_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/glib2 ---> Fetching distfiles for glib2 ---> Attempting to fetch glib-2.32.4.tar.xz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/glib2 ---> Verifying checksum(s) for glib2 ---> Extracting glib2 ---> Applying patches to glib2 ---> Configuring glib2 ---> Building glib2 ---> Staging glib2 into destroot ---> Installing glib2 @2.32.4_0 ---> Activating glib2 @2.32.4_0 ---> Cleaning glib2 ---> Fetching archive for pkgconfig ---> Attempting to fetch pkgconfig-0.27_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/pkgconfig ---> Attempting to fetch pkgconfig-0.27_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/pkgconfig ---> Attempting to fetch pkgconfig-0.27_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/pkg... ---> Fetching distfiles for pkgconfig ---> Attempting to fetch pkg-config-0.27.tar.gz from http://pkg-config.freedesktop.org/releases/ ---> Attempting to fetch pkg-config-0.27.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/pkgconfig ---> Verifying checksum(s) for pkgconfig ---> Extracting pkgconfig ---> Configuring pkgconfig ---> Building pkgconfig ---> Staging pkgconfig into destroot ---> Installing pkgconfig @0.27_0 ---> Activating pkgconfig @0.27_0 ---> Cleaning pkgconfig ---> Updating database of binaries: 100.0% ---> Scanning binaries for linking errors: 100.0% ---> No broken files found.

Comments and changes to this ticket

  • Paul J. Davis

    Paul J. Davis September 17th, 2012 @ 12:47 PM

    I haven't touched this project in quite some time. Though from the looks of this error report it looks like you're missing nspr and/or pkg-config. If you have Homebrew installed, you should be able to fix this with a brew install nspr brew install pkg-config.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Python/JavaScript bridge module, making use of Mozilla's spidermonkey JavaScript implementation. Allows implementation of JavaScript classes, objects and functions in Python, and evaluation and calling of JavaScript scripts and functions respectively. Borrows heavily from Claes Jacobssen's Javascript Perl module, in turn based on Mozilla's 'PerlConnect' Perl binding.

People watching this ticket

Pages