I am attempting to install xulrunner on OSX 10.6.3 using the following:
sudo port install xulrunner
However, I am receiving the following error:
nat-10-200-136-126:phoneyc-new $ sudo port install xulrunner
---> Computing dependencies for xulrunner
---> Activating zlib #1.2.5_0
Error: The following dependencies failed to build: gconf dbus-glib glib2 zlib gtk-doc docbook-xml docbook-xml-4.1.2 xmlcatmgr docbook-xml-4.2 docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 docbook-xml-5.0 docbook-xsl gnome-doc-utils iso-codes libxslt libxml2 p5-xml-parser py26-libxml2 python26 bzip2 db46 gdbm openssl readline sqlite3 tk Xft2 fontconfig freetype xrender xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-renderproto tcl xorg-libXScrnSaver xorg-libXext xorg-scrnsaverproto rarian getopt intltool gnome-common p5-getopt-long p5-pathtools p5-scalar-list-utils gtk2 atk cairo libpixman libpng jasper jpeg pango shared-mime-info tiff xorg-libXcomposite xorg-compositeproto xorg-libXfixes xorg-fixesproto xorg-libXcursor xorg-libXdamage xorg-damageproto xorg-libXi xorg-libXinerama xorg-xineramaproto xorg-libXrandr xorg-randrproto orbit2 libidl policykit heimdal lcms libcanberra gstreamer bison flex gzip texinfo lzmautils libvorbis libogg libnotify nss xorg-libXt xorg-libsm xorg-libice
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.
nat-10-200-136-126:phoneyc-new$
I am unsure how to correct this issue, so any help would be much appreciated!
Did you try running with the -d flag?
You'd probably be best served by running:
sudo port install gconf
sudo port dbus-glib
etc
to see which exactly is breaking.
However, it might be possible this is using some Linux only code that might not be available in Mac OS X
Related
I am trying to build Pycurl against a version of libcurl (7.53.1) without success.
I am on MACOSX El Capitan v10.11.6.
I am not even sure I am aligned with OpenSSL at this point. I may need to make sure OpenSSL is properly installed and get Curl built with OpenSSL. Finally get Pycurl built with the proper Curl.
I have been followed couple of tracks on-line but none of them are getting me where I need to be.
What would be the best option to solve this build issue?
Log:
users-MBP-2:~ mickael$ sudo easy_install pycurl
Password:
Searching for pycurl
Reading https://pypi.python.org/simple/pycurl/ Best match: pycurl 7.43.0
Downloading https://pypi.python.org/packages/12/3f/557356b60d8e59a1cce62ffc07ecc03e4f8a202c86adae34d8958262 81fb/pycurl-7.43.0.tar.gz#md5=c94bdba01da6004fa38325e9bd6b9760
Processing pycurl-7.43.0.tar.gz
Writing /tmp/easy_install-tmm5sV/pycurl-7.43.0/setup.cfg
Running pycurl-7.43.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tmm5sV/pycurl-7.43.0/egg-dist- tmp-Yj_ArM
Using curl-config (libcurl 7.53.1)
warning: no files found matching 'src/Makefile'
In file included from src/docstrings.c:4:
In file included from src/pycurl.h:32:
In file included from /usr/local/Cellar/curl/7.53.1/include/curl/curl.h:39: /usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:143:6: error: '__curl_rule_01__' declared as an array with a negative
size
[CurlchkszEQ(long, CURL_SIZEOF_LONG)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ' #define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:153:6: error: '__curl_rule_02__' declared as an array with a negative
size
[CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ' #define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
^~~~~~~~~~~~~~~~~~~~~~~ In file included from src/docstrings.c:4:
src/pycurl.h:190:5: warning: "libcurl was compiled with SSL support, but configure could not determine
which " "library was
used; thus no SSL crypto locking callbacks will be set, which may "
requests" [-W#warnings]
# warning \ ^
1 warning and 2 errors generated.
error: Setup script exited with error: command 'cc' failed with exit status 1
"cause random crashes on SSL
Ok, there is definitely some challenges to build Pycurl. Here are the steps I took:
Make sure OpenSSL was installed (if not use Brew: brew install openssl).
Rebuild Curl with OpenSSL, remember Curl is not built with OpenSSL by default on MacOsX/El Capitan, SecureTransport is used instead. (try: brew install --force curl --with-openssl)
Rebuild Pycurl with "pip". I had success with pip but not with easy_install. (try: sudo env ARCHFLAGS="-arch x86_64" LDFLAGS="-L/usr/local/opt/openssl/lib" pip install pycurl)
Pycurl is installed under: /Library/Python/2.7/site-packages/pycurl.so
Version installed is: pycurl-7.43.0
I would like to construct a "Hello, World!" of audio for OS X/Python 3 that populates a buffer with a sine wave and plays it through the speakers.
My basic options are listed in Audio in Python.
Playing Music with Python demonstrates several of these, but it omits details of installation.
I'm trying PyAudio first.
PyAudio has a section on OS X, saying "For Python 3 support, first install MacPython 3.3"
This confuses me greatly. OS X ships with Python. Also, I have used Homebrew to install Python 3. I've never come across the term MacPython, so I'm not sure if what I have is MacPython or not. And if it isn't, then I want to install PyAudio for the Python I currently have. I don't want to have to download some special Python to use it. That would be completely defeating the purpose.
I also tried "pip3 install pyaudio", with the following (negative) results:
⤐ pip3 install pyaudio
Collecting pyaudio
Could not find a version that satisfies the requirement pyaudio (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pyaudio to allow).
No matching distribution found for pyaudio
✘
pi#piBookAir.local ~ /Users/pi:
⤐ pip install --allow-external pyaudio
You must give at least one requirement to install (see "pip help install")
✔
pi#piBookAir.local ~ /Users/pi:
⤐ pip install pyaudio --allow-external pyaudio
Collecting pyaudio
Could not find a version that satisfies the requirement pyaudio (from versions: )
Some insecure and unverifiable files were ignored (use --allow-unverified pyaudio to allow).
No matching distribution found for pyaudio
✘
It's frustrating that it is so awkward to even get onto the first rung of the ladder.
How can I correctly install PyAudio for Python 3 on my (up-to-date) OS X? Should I use Homebrew? Should I use pip3?
PS: PyAudio with Homebrew -- I hope I don't have to follow this solution
PPS: Music software written in Python lists a daunting number of possible solution paths -- I'm not at all certain PyAudio is the best path. Is there a better one?
Use Homebrew to install the prerequisite portaudio library, then install PyAudio using pip:
brew install portaudio
pip install pyaudio
Notes:
If not already installed, download Homebrew.
pip will download the PyAudio source and build it for your version of Python.
Homebrew and building PyAudio also require installing the Command Line Tools for Xcode (more information).
(This works on Mac OS X)
At first PyAudio has a portaudio dependency:
brew install portaudio
And then run:
pip3 install pyaudio --global-option="build_ext" --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib"
Or sometimes magic happens, if you use:
python3 -m pip install pyaudio --global-option="build_ext" --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib"
Unfortunately, 王淳龙's solution did not work for me (macOS v10.15.6 (Catalina), Python 3.8.5). The following errors persisted:
gcc-5 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/tom/anaconda3/include -arch x86_64 -I/Users/tom/anaconda3/include -arch x86_64 -DMACOSX=1 -I/Users/tom/anaconda3/include/python3.6m -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.6/src/_portaudiomodule.o
In file included from src/_portaudiomodule.c:33:0:
/usr/local/include/pa_mac_core.h:48:33: fatal error: AudioUnit/AudioUnit.h: No such file or directory
compilation terminated.
error: command 'gcc-5' failed with exit status 1
Therefore, I had to link the missing libraries manually:
cd /usr/local/include/
ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers AudioUnit
ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/Headers AudioToolbox
ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Versions/A/Headers CoreAudioTypes
ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers CoreFoundation
ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers CoreAudio
This solved the dependencies, but not the following compiler problem:
In file included from /usr/local/include/AudioToolbox/AUComponent.h:65:0,
from /usr/local/include/AudioUnit/AUComponent.h:1,
from /usr/local/include/AudioUnit/AudioUnit.h:11,
from /usr/local/include/pa_mac_core.h:48,
from src/_portaudiomodule.c:33:
/usr/local/include/AudioToolbox/AudioComponent.h:509:39: error: expected ')' before '^' token
void (^inCompletionHandler)(AudioComponentInstance __nullable, OSStatus))
^
Forcing the use of system-wide gcc (Apple Clang version 11.0.3) instead of gcc-5 solved the problem. I did that by uninstalling gcc#5 and linking gcc-5 to gcc. However, there must be a more elegant way.
Today I also encountered this problem and searched a lot. Finally I found a solution:
brew install portaudio
pip install pyaudio
Python vs MacPython:
AFAIK there is no such thing as MacPython — or at least not from the developers of Python. I can only assume whoever created the link on the PyAudio page tried to get creative with the name and were actually meaning the "Mac OS X 64-bit/32-bit installer containing Python v3.3".
The link to the mysteriously named MacPython leads to the main Python download page that features the most recent stable versions (which as of today is v3.4.3):
https://www.python.org/downloads/release/python-343/
PyAudio:
PyAudio can be compiled from source, outlined here, which might yield better results.
I'm trying to install pandoc 1.13.1 on Ubuntu 12.04.5, but its failing due to a dependency on http-client:
$ cabal install pandoc --verbose
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Extracting
/home/paleozogt/.cabal/packages/hackage.haskell.org/pandoc/1.13.1/pandoc-1.13.1.tar.gz
to /tmp/pandoc-1.13.1-14926...
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
/usr/bin/ghc --make /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs -o /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup -odir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -hidir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -i -i/tmp/pandoc-1.13.1-14926/pandoc-1.13.1 -package Cabal-1.14.0
[1 of 1] Compiling Main ( /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs, /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/Main.o )
Linking /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup ...
/tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup configure --verbose=2
--ghc --prefix=/home/paleozogt/.cabal --user --flags=-trypandoc
--flags=network-uri --flags=-make-pandoc-man-pages --flags=https
--flags=-embed_data_files --constraint=zlib ==0.5.4.1 --constraint=zip-archive
==0.2.3.4 --constraint=yaml ==0.8.9.3 --constraint=xml ==1.3.13
--constraint=vector ==0.10.12.1 --constraint=unordered-containers ==0.2.5.1
--constraint=time ==1.4 --constraint=text ==1.1.1.3 --constraint=texmath ==0.8
--constraint=temporary ==1.2.0.3 --constraint=tagsoup ==0.13.3
--constraint=syb ==0.4.2 --constraint=scientific ==0.3.3.1 --constraint=random
==1.0.1.1 --constraint=process ==1.1.0.1 --constraint=parsec ==3.1.7
--constraint=pandoc-types ==1.12.4.1 --constraint=old-time ==1.1.0.0
--constraint=old-locale ==1.0.0.4 --constraint=network-uri ==2.6.0.1
--constraint=network ==2.6.0.2 --constraint=mtl ==2.2.1
--constraint=http-types ==0.8.5 --constraint=http-client-tls ==0.2.2
--constraint=http-client ==0.4.2 --constraint=hslua ==0.3.13
--constraint=highlighting-kate ==0.5.9 --constraint=haddock-library ==1.1.1
--constraint=filepath ==1.3.0.0 --constraint=extensible-exceptions ==0.1.1.4
--constraint=directory ==1.1.0.2 --constraint=deepseq-generics ==0.1.1.1
--constraint=data-default ==0.5.3 --constraint=containers ==0.4.2.1
--constraint=bytestring ==0.9.2.1 --constraint=blaze-markup ==0.6.1.1
--constraint=blaze-html ==0.7.0.3 --constraint=binary ==0.7.2.2
--constraint=base64-bytestring ==1.0.0.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --constraint=aeson ==0.7.0.6 --constraint=SHA
==1.6.4.1 --constraint=JuicyPixels ==3.1.7.1 --constraint=HTTP ==4000.2.18
--disable-tests --disable-benchmarks
Configuring pandoc-1.13.1...
setup: At least the following dependencies are missing:
http-client >=0.3.2 && <0.4 && ==0.4.2
World file is already up to date.
cabal: Error: some packages failed to install:
pandoc-1.13.1 failed during the configure step. The exception was:
ExitFailure 1
What's weird is that http-client is installed:
$ cabal install http-client
Resolving dependencies...
All the requested packages are already installed:
http-client-0.4.2
Use --reinstall if you want to reinstall anyway.
What's going on here?
It seems cabal installed a too recent version of the http-client. I had the same problem and got over it by doing
cabal install --reinstall --force-reinstalls 'http-client < 0.4'
ghc-pkg unregister http-client-tls-0.2.2
ghc-pkg unregister http-client-0.4.2.2
cabal install pandoc
cabal install pandoc 'http-client < 0.4'
checking whether cairo's PNG functions feature could be enabled... no
I have been following the setup for configuring node canvas. Cairo is needed but i am having issues trying to set it up. https://github.com/Automattic/node-canvas/wiki/Installation---OSX
If libpng fails and you get the error "error: recommended PNG functions feature could not be enabled", try installing this binary and re-running the configure step.
I followed above by installing the binaries on Mac OS 9 and run the configuration command and still no luck. I am running the install shell script in node-canvas repository:
https://github.com/Automattic/node-canvas/blob/master/install
In my /usr/local/lib I currently have:
dtrace libjpeg.8.dylib libpng.a libpng14.a
libfreetype.6.dylib libjpeg.a libpng.dylib libpng14.dylib
libfreetype.a libjpeg.dylib libpng.la libpng14.la
libfreetype.dylib libjpeg.la libpng12.0.dylib libpng15.15.dylib
libfreetype.la libpixman-1.0.dylib libpng12.0.dylib.dSYM libpng15.15.dylib.dSYM
libgif.4.1.6.dylib libpixman-1.a libpng12.a libpng15.a
libgif.4.dylib libpixman-1.dylib libpng12.dylib libpng15.dylib
libgif.a libpixman-1.la libpng12.la libpng15.la
libgif.dylib libpng.3.dylib libpng14.14.dylib node_modules
libgif.la libpng.3.dylib.dSYM libpng14.14.dylib.dSYM pkgconfig
Libpng-1.6.10 has been replaced by libpng-1.6.12.
In your install script, change
LIBPNG="http://downloads.sourceforge.net/project/libpng/libpng16/1.6.10/libpng-1.6.10.tar.gz"
to
LIBPNG="http://downloads.sourceforge.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz"
I have a set of detailed instructions for building cairo here:
https://github.com/soegaard/racket-osx-libs
There resulting libraries are here:
https://github.com/soegaard/racket-osx-libs/tree/master/lib
I used this guide to install the "scientific stack" for Python (OSX 10.9.2, brewed Python 2.7.6, IPython 2.0, matplotlib 1.3.1, libpng 1.6.10). Everything was looking good.
However, trying to run a simple plot in IPython's notebook environment with --pylab=inline gives me this error:
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct
FormatterWarning,
And in the terminal it says: libpng warning: Application built with libpng-1.5.17 but running with 1.6.10
I have no other libpng installed as far as I can tell. I tried deleting all files beginning with libpng from /usr/local/ and reinstalling everything, to no avail. The output from building matplotlib (pip install matplotlib) contains:
BUILDING MATPLOTLIB
matplotlib: yes [1.3.1]
python: yes [2.7.6 (default, Mar 16 2014, 15:04:47) [GCC
4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)]]
platform: yes [darwin]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.8.1]
dateutil: yes [using dateutil version 2.2]
tornado: yes [using tornado version 3.2]
pyparsing: yes [using pyparsing version 2.0.1]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: yes [version 17.2.11]
png: yes [version 1.6.10]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.3.1]
OPTIONAL BACKEND EXTENSIONS
macosx: yes [installing, darwin]
qt4agg: yes [installing, Qt: 4.8.6, PyQt4: 4.10.4]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing, version 81008]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
So it seems to me matplotlib should be compiled against libpng 1.6.10? Can someone help me figure out what's going on?
An expansion of the answer provided by #glenn-randers-pehrson:
pip uninstall matplotlib
cd /opt/X11/include/libpng15
mv png.h _png.h
mv pngconf.h _pngconf.h
mv pnglibconf.h _pnglibconf.h
pip install matplotlib
(if needed remove the old directory or use the force option)
(now move the .h files back to their original locations)
Look for old header files beginning with "png" (png.h, pngconf.h, perhaps others) and remove them.
For the sake of documentation (following on from above comments):
Remove X11
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
Then,
if you have matplotlib / python installed, run the following as appropriate:
pip uninstall matplotlib
pip uninstall ipython
Then,
pip install matplotlib
pip install ipython
If necessary, XQuartz can be re-installed from https://www.macupdate.com/app/mac/26593/xquartz.
[Note: This does re-add the /opt/X11/include/libpng15/png.h etc files, but ipython worked fine afterwards.]
While it is a bit ridiculous having multiple copies of libpng around, this problem results from the path for the pip compiler and python being different. You could also fix this problem through the path, and then recompiling, but the above solutions work too.