How can I install qpdf on Mac 10.8.3? - macos

When running R CMD check on packages on a Mac build server, I'm getting a warning
‘qpdf’ is needed for checks on size reduction of PDFs
I can't seem to get qpdf installed and on the system. I tried installing via the fink package manager, but according to the package database (http://pdb.finkproject.org/pdb/package.php/qpdf), qpdf doesn't seem to have been built since osx 10.6, and I'm on 10.8.3.
Can anyone point me to qpdf mac install or build instructions? Or is there a way to disable the warning when checking R packages?
This is somewhat related to the question qpdf.exe for compactPDF?, although they were on a windows machine and I'm on a mac.

You can install qpdf with homebrew:
brew install qpdf

MacPorts can help you. Download MacPorts from http://www.macports.org/ and run sudo port install qpdf.

Related

updating octave: linking the installation

I have OSX 10.10.5 with Octave 3.4.0 running (installed, who knows how, I did it a million different ways through port, file extraction, ftp, homebrew…). I tried to update my Programme (brew install octave or sudo port install octave) and Terminal spits out:
Warning: octave-3.8.2 already installed, it's just not linked
Okay, great. So I have a better programme somewhere installed. What now? How on earth am I supposed to “just link” the newer installation?
If you install octave with Homebrew and it doesn't link it it should tell you why. You can force Homebrew to link octave with
$ brew link --overwrite octave
You can also add the --dry-run option to check and see what Homebrew will do to link octave
$ brew link --overwrite --dry-run octave
A possible reason for Homebrew not linking octave is that you've installed it by another method, MacPorts for instance. It is not recommended that you use both Homebrew and MacPorts on the same system.

Installing Caffe (deep learning) issues

I have been able to install Caffe but I had a lot of issues and that's because I didn't follow the instructions very well.
I have a Mac OSx and I'm reading the OSx guide for installation.
In this point:
when I type hdf5 opencv I get:
"hdf5: command not found"
I've tried to install hdf5 by Homebrew and MacPorts but I'm still getting:
"hdf5: command not found"
Does anyone have any clue?
Thank you very much.
according to the answer of #mattias, my binaries in /usr/local/hdf5 are:
hdf5 is not a command or anything else. The documentation is just bad, it has to be:
brew tap homebrew/science hdf5 opencv
So, what I mean is, we have to install hdf5 and then link it to Caffe. But executing hdf5 is not what the guide meant.
You can install hdf5 from source. I just tested on OS X 10.9.5.
wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.14.tar
Unpack,
tar zxfv hdf5-1.8.14.tar
Enter directory
cd hdf5-1.8.14
And then,
./configure --prefix=/usr/local/hdf5 # or where you want it
make
sudo make install
Then you have it installed in /usr/local/hdf5.
Good luck!

Setup Macports on an offline machine

I need to install dpkg for my mac and the easiest way I have seen for doing that is to install Macports. Unfortunately the machine I want to install it on is not connected to the internet.
Is there a way to download dpkg and its dependencies for macports and install the packages on the offline machine?
I have seen people mention to set it up on an online machine and move the whole macports folder, however the only machine I have online is running a different OSX version which could cause issues.
Thanks in advance.
You could try to download all sourcefiles using
sudo port fetch rdepof:dpkg
and then copy everything in (/opt/local/var/macports/distfiles/) to the offline machine and put it in the same folder there.
Then you should be able to build dpkg using
sudo port install -s dpkg
The -s option forces macports to build from source. (Prevent MacPorts from installing pre-built package?)

Where is PyGTK for Mac OS X?

Is there a binary out there for the current mac os x, python for PyGTK? I work with multiple desktop environments (mac, windows, gnome) and really consider python's lack of cross platform GUI's a problem. Does anyone know where I can find a built version of PyGTK and GTK for Mac?
I cant clone the git repository, it keeps timing out.
brew install pygtk worked for me (requires homebrew).
Confirmed to work with OS X 10.10 too, but by default it will install it into brew's Python distribution, so if you are still using the native python, it will not find it.
I don't use macports but it seems that jhbuild works for me. Below is the steps that I've done.
download gtk-osx-build-setup.sh from: https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh and save it to your home directory.
fire up terminal and navigate to your home directory and run the command sh gtk-osx-build-setup.sh
the shell script will warn you that ~/.local/bin isn't added to your environment variable to do this, edit your .profile file located at your home directory and /Users/<username>/.local/bin to your environment variable. to know more on how to edit this file check out: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
after that, do a ~/.local/bin/jhbuild bootstrap command. it will download and install some necessary utilities.
download and install the beta version of the gtk+ osx framework at: http://ftp.imendio.com/pub/imendio/gtk-osx/Gtk-Framework-2.14-LATEST.dmg
before installing the meta-gtk-osx-python, you need to build and install some other packages that jhbuild doesn't install automatically, so what i did was i installed libpng by doing the command: ~/.local/bin/jhbuild build libpng
you also need to install libtiff so do the command: ~/.local/bin/jhbuild build libtiff
and also gtk-doc is needed so: ~/.local/bin/jhbuild build gtk-doc
and finally you can now install meta-gtk-osx-python by doing a: ~/.local/bin/jhbuild build meta-gtk-osx-python
Let me know if it works.
There is an installer for PyGTK 2.24 in test here, announced on the PyGTK list.
UPDATE project has moved on macpkg's sourceforge page.
I couldn't make it work with meld (segmentation fault), but sample PyGTK programs work OK.
UPDATE 2 since then a new package Py3GTK3 appeared on the same sourceforge page. Haven't tested though.
There is now a mac package on sourceforge
Download the latest package from http://sourceforge.net/projects/macpkg/files/PyGTK/ and install.
If you're just trying to use the system python, this is all you'll have to do.
If you're not, the following is how to install it with pyenv, which can be installed with Homebrew. With brew installed, you can install version pyenv and Python 2.7.8 with:
brew install pyenv && pyenv install 2.7.8
After you've done that, you'll then have copy the gtk package and its dependencies into your python installation:
cd /opt/gtk/lib/python2.7/site-packages/ && \
cp * ~/.pyenv/versions/2.7.8/lib/python2.7/site-packages/
That's it. You can also similarly install the Py3GTK3 package which has packages for python 2.7 and 3.2 from http://sourceforge.net/projects/macpkg/files/Py3GTK3/.
Have you tried doing it using macports? This website shows how.

How to install scons on Mac OS X

Can you please tell me how can I install scons on MacOSX?
I don't see a mac specified download from http://www.scons.org/
Thank you.
An alternative to MacPorts would be to use HomeBrew, where you'd just to
brew install scons
Download the tarball and then refer to the first chapter of the user guide, Building and Installing SCons. In short:
# cd scons-1.2.0
# python setup.py install
Install MacPorts, then at the Terminal (Applications > Utilities > Terminal.app), type:
sudo port install scons
This command will automatically download and install scons for you. MacPorts requires that you have the developer tools installed, so if you don't, you will need to download and install the Xcode 3 DVD.
NOTE 1: Xcode 2.5 is the last version of Xcode that will work on Mac OS X Tiger.
NOTE 2: This may seem awfully painful if you don't already have MacPorts installed. However, you really should go this route, as MacPorts makes it easy to update installed software, it automatically manages dependencies between software, and it makes it easier to install other packages in the future.
If you have the Python setuptools, the following will install scons-1.2.0 from sourceforge:
easy_install scons
But bear in mind the issues people raise with setuptools.
Also, keep in mind this question and the answers about virtualenv and pip for isolating Python environments.
There is also a GUI installer for SCons on Mac OS X that I wrote available for download here:
https://github.com/rviney/scons-mac-installer
Since version 2.3.0 SCons should work without installing:
# get the source and switch to stable 2.3.0 version
hg clone https://bitbucket.org/scons/scons/ -r 2.3.0
# make sure to use Python 2 for now
python scons/src/scripts/scons.py
When running 2.3.0 from source, the SCons.__version__ is not set correctly, so EnsureSConsVersion() will likely to fail if that's ok for you.
pull down SCons source and put it in /Library/Python/X.X/. Make sure you have the dir structure like this: /Library/Python/X.X/SCons/init.py
remember, import searches for modules, and /Library/Python/XXX is by default in the search path.

Resources