How to use pip after the OS X El Capitan upgrade? Ask Question Asked 4 years, 3 months ago. Do you want to continue using the Mac OS X version of Python or install your own? Then I tried sudo pip install -ignore-installed ipython and it runs until 'Running setup.py install for pexpect'. OS X Installation ¶ We provide binaries for OS X for each of the supported Python versions in the wheel format. $ python setup.py install Building on Windows.
Reported by Calum Moore June 24th, 2009 @ 10:16 PM
Hi
I have used macport to install spidermonkey. It says this isinstalled.
When i attempt to build spidermonkey it fails with the errormessage below.
Macintosh-9:python-spidermonkey-0.0.7 calum$ python setup.pybuild
Traceback (most recent call last):
File 'setup.py', line 186, in
File 'setup.py', line 143, in platform_config
File 'setup.py', line 87, in nspr_config
File 'setup.py', line 59, in pkg_config
RuntimeError: No package configuration found for: nspr
Same message appears when i attempt install.
Macintosh-9:python-spidermonkey-0.0.7 calum$ python setup.pyinstall
Traceback (most recent call last):
File 'setup.py', line 186, in
File 'setup.py', line 143, in platform_config
File 'setup.py', line 87, in nspr_config
File 'setup.py', line 59, in pkg_config
RuntimeError: No package configuration found for: nspr
Really have no idea what is wrong.
Calum
Calum,
You need to make sure that libnspr is installed from ports. Youcan install it like:
Though it should've been installed for spidermonkey I think. Ifthat says nspr is already installed check and see if there's annspr-config script in /opt/local/bin. If there is, then you justneed to make sure /opt/local/bin is on your path. You can do thattemporarily why running the setup.py script like such:
Let me know if that fixes things.
Thanks for the quick reply!
I seem to have nspr installed because when using:
$ sudo port install nspr
I get the following already installed message (well i thinkthat's what it is)
Macintosh-9:~ calum$ sudo port install nspr
Password:
Skipping org.macports.activate (nspr ) since this port is alreadyactive
---> Cleaning nspr
I checked /opt/local/bin and there is a nspr-config file. Iused
$ PATH=$PATH:/opt/local/bin python setup.py build
and again got the same error as always:
Macintosh-9:python-spidermonkey-0.0.7 calum$PATH=$PATH:/opt/local/bin python setup.py build
Traceback (most recent call last):
File 'setup.py', line 186, in
File 'setup.py', line 143, in platform_config
File 'setup.py', line 87, in nspr_config
File 'setup.py', line 59, in pkg_config
RuntimeError: No package configuration found for: nspr
Also to note, when I installed MacPorts for the first time itdidn't work. So i added the following to/Users/Calum/.bash_profile
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
test -r /sw/bin/init.sh && . /sw/bin/init.sh
Now the complete file (/Users/Calum/.bash_profile) reads:
PATH='/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}'
export PATH
##
##
export MANPATH=/opt/local/share/man:$MANPATH
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
test -r /sw/bin/init.sh && . /sw/bin/init.sh
Not sure if this is having an effect. Trivial pursuit categories.
Calum
Just to clarify the parts in header format are commented out,but i'm guessing the hash is seen as formatting and thereforeremoved.
Calum,
Oh, forgot one, you need pkgconfig installed too.
In the end, you need the following command to work:
If that fixes things I'll add a note to the README.
Paul
Sorry for the delay in the response. My computer went in forrepairs so I won't know till next week. I will let you know as soonas I get it from repairs.
Calum
I can confirm that it does fix it.
Cheers,
Bernardo Heynemann
But then I get the following:
sudo pip install python-spidermonkey
Downloading/unpacking python-spidermonkey
Running setup.py egg_info for package python-spidermonkey
Installing collected packages: python-spidermonkey
Running setup.py install for python-spidermonkey
running build
running build_ext
building 'spidermonkey' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g-fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386-arch ppc -arch x86_64 -pipe -Ispidermonkey/libjs-Ispidermonkey/Darwin-i386 -I/opt/local/include/nspr-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6-c ./spidermonkey/libjs/jsarena.c -obuild/temp.macosx-10.6-universal-2.6/./spidermonkey/libjs/jsarena.o-DJS_THREADSAFE -DPOSIX_SOURCE -D_BSD_SOURCE -Wno-strict-prototypes-DXP_UNIX
In file included from ./spidermonkey/libjs/jsarena.c:49:
./spidermonkey/libjs/jsbit.h:169: error: size of array‘js_static_assert_line_169’ is negative
lipo: can't open input file: /var/tmp//ccdi5TV7.out (No suchfile or directory)
error: command 'gcc-4.2' failed with exit status 1
Command /usr/local/virtual/bin/python -c 'import setuptools;file='/usr/local/virtual/build/python-spidermonkey/setup.py';execfile('/usr/local/virtual/build/python-spidermonkey/setup.py')'install --single-version-externally-managed --record/tmp/pip-snHrZX-record/install-record.txt --install-headers/usr/local/virtual/lib/include failed with error code 1
I'm getting the same build failure on snow leopard.
I installed pkgconfig and nspr with ports. I'm using a Pythonbuilt
from source.
./spidermonkey/libjs/jsapi.c: In function'JS_ConvertArgumentsVA': ./spidermonkey/libjs/jsapi.c:267: warning:passing argument 5 of 'TryArgumentFormatter' from incompatiblepointer type ./spidermonkey/libjs/jsapi.c: In function'JS_PushArgumentsVA': ./spidermonkey/libjs/jsapi.c:370: warning:passing argument 5 of 'TryArgumentFormatter' from incompatiblepointer type In file included from./spidermonkey/libjs/jsarena.c:49:
./spidermonkey/libjs/jsbit.h:169: error: size of array'js_static_assert_line_169' is negative error: command 'gcc' failedwith exit status 1
I beat my head on this a bit more.
The assertion errors results from sizeof(unsigned) (4) not beingthe
same as sizeof(unsigned long) (8). I assume this was somethingthat
changed in Mac OS X Snow Leopard.
Since python-spidermonkey includes a snapshot of spidermonkey,I
thought I'd try to install later versions of spider monkley and
install python-spidermonkey via system libraries. After muchflailing,
I managed to get a system build of spider monkey from themercurial
repo build with --enable-threadsafe and managed to get
python-spidermonkey to use it by hand crafting a mozilla-ns.pcfile.
Unfortunately, python-spidermonkey fails to build with manyerrors
suggesting the spidermonkey apis have changed too much for
python-spidermonkey to keep up with.
To build a python-spidermonkey egg on Mac OS X 10.6(Snow Leopard):
Install from MacPorts:
pkg-config
spidermonkey
The spidermonkey port will installnspr as a dependency.
(The +universal is optional. If you use a universalbuild of Python it's better to build universal libraries too.)
Create a pkg-config metadata file forspidermonkey because it
does not create one during install.
The file needs to be named mozilla-js.pc becausethat's the name python-spidermonkey is looking forwhen it calls pkg-config.
Open in your favorite editor/opt/local/lib/pkgconfig/mozilla-js.pc and put thiscontent in
Download a source distribution of thepython-spidermonkey egg from
http://pypi.python.org/pypi/python-spidermonkey/0.0.9or the latest snapshot from the python-spidermonkeyhome page listed at PyPI.
Unpack the source distribution and build the egg usingzc.buildout
or Python
(Add the appropriate path to buildout or python above.)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.
Create new ticketHelp contribute to this project by taking a few moments to create your personal 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.
on a Mac OSX 10.6.6,
I had the following error for ros install command:rosinstall ~/ros 'http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=ros-full&overlay=no'
what went wrong?[ rosmake ] rosdep successfully installed all system dependencies
[ rosmake ] Starting >>> tools/rospack
[ rosmake ] Finished <<< tools/rospack
[rosmake-0] Starting >>> roslib [ make ]
[ rosmake ] All 20 linesoslib: 0.7 sec ] [ 1 Active 1/68 Complete ]{------------------------------------------------------------------------------- mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake . [rosbuild] Building package roslib [rosbuild] Including /Users/paulogoncalves/ros/ros_comm/clients/roslisp/cmake/roslisp.cmake [rosbuild] Including /Users/paulogoncalves/ros/ros_comm/clients/rospy/cmake/rospy.cmake [rosbuild] Including /Users/paulogoncalves/ros/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake Traceback (most recent call last): File '/Users/paulogoncalves/ros/ros/bin/rosboost-cfg', line 35, in <module> rosboost_cfg.main() File '/Users/paulogoncalves/ros/ros/tools/rosboost_cfg/src/rosboost_cfg/rosboost_cfg.py', line 328, in main raise BoostError('Cannot find boost in any of %s'%search_paths(options.sysroot)) rosboost_cfg.rosboost_cfg.BoostError: 'Cannot find boost in any of [('/usr', True), ('/usr/local', True)]' CMake Error at /Users/paulogoncalves/ros/ros/core/rosbuild/public.cmake:848 (message): rosboost-cfg --include_dirs failed Call Stack (most recent call first): CMakeLists.txt:5 (rosbuild_add_boost_directories)
-- Configuring incomplete, errors occurred!-------------------------------------------------------------------------------}[ rosmake ] Output from build of package roslib written to:[ rosmake ] /Users/paulogoncalves/.ros/rosmake/rosmake_output-20110317-103414/roslib/build_output.log[rosmake-0] Finished <<< roslib [FAIL] [ 0.78 seconds ]
[rosmake-1] Starting >>> rosemacs [ make ]
[rosmake-1] Finished <<< rosemacs No Makefile in package rosemacs
[rosmake-2] Starting >>> rosboost_cfg [ make ]
[rosmake-2] Finished <<< rosboost_cfg No Makefile in package rosboost_cfg
[ rosmake ] Halting due to failure in package roslib. [ rosmake ] Waiting for other threads to complete.[rosmake-3] Starting >>> rosbash [ make ]
[rosmake-3] Finished <<< rosbash No Makefile in package rosbash
[ rosmake ] Results:
[ rosmake ] Built 5 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /Users/paulogoncalves/.ros/rosmake/rosmake_output-20110317-103414
Traceback (most recent call last): File '/usr/local/bin/rosinstall', line 5, in <module> pkg_resources.run_script('rosinstall0.5.16', 'rosinstall') File '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py', line 442, in run_script self.require(requires)[0].run_script(script_name, ns) File '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py', line 1167, in run_script exec script_code in namespace, namespace File '/Library/Python/2.6/site-packages/rosinstall-0.5.16-py2.6.egg/EGG-INFO/scripts/rosinstall', line 556, in <module>
File '/Library/Python/2.6/site-packages/rosinstall-0.5.16-py2.6.egg/EGG-INFO/scripts/rosinstall', line 547, in rosinstall_main
File '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py', line 462, in check_call raise CalledProcessError(retcode, cmd)subprocess.CalledProcessError: Command 'source /Users/paulogoncalves/ros/setup.sh && rosmake ros ros_comm --rosdep-install' returned non-zero exit status 1