I ran into this issue while installing dblatex (0.2.10) from the most recent MacPorts tree today:
Traceback (most recent call last): File "/opt/local/bin/dblatex", line 16, in
from dbtexmf.dblatex import dblatex ImportError: No module named dbtexmf.dblatex
I got past it by exporting
PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages, but clearly this was not optimal. I was about to file a bug report about the issue but before I did that I read their new ticket guidelines which requested the full build log be included in the ticket.
In the build log was the solution. I would have missed it had my shell scrollback not been set to unlimited. Nestled a good 182 lines back in my buffer was this little message:
---> Installing python26 @2.6.4_0+darwin ---> Activating python26 @2.6.4_0+darwin To fully complete your installation and make python 2.6 the default, please run sudo port install python_select sudo python_select python26
I did as instructed, and sure enough, dblatex started working! I just wanted to post this on the blog in case anyone else ran into this and missed it like I did.
You may find this helpful if you should find yourself using Erlang on OS X and you’ve installed it using Macports. After a default installation you’ll need to manually configure your .emacs file for erlang-mode and set your $MANPATH variable correctly, here’s how.
If you’ve installed Erlang with Macports then you may have noticed that when you edit .erl files you’re not entering into erlang-mode, nor is it available to enter into. Here’s how I got erlang-mode working on my system.
Macports will install Erlang into /opt/local/lib/erlang by default. The paths to put in your .emacs file provided in the erlang-mode documentation only need to be tweaked a slight bit to function properly. Here’s what I put in mine:
(setq load-path (cons "/opt/local/lib/erlang/lib/tools-2.6.4/emacs/" load-path)) (setq erlang-root-dir "/opt/local/lib/erlang") (setq exec-path (cons "/opt/local/bin" exec-path)) (require 'erlang-start)
Note that you may require setting “tools-2.6.4” to something else if Macports has upgraded it’s distribution of Erlang.
Setting up your $MANPATH variable is fairly simple as well. Just put the string “/opt/local/lib/erlang/man” in a file called ‘erlang’ in /etc/manpaths.d/ and make sure it ends with an empty line. Test this by opening a new terminal and running: echo $MANPATH | grep erlang. If it doesn’t come back empty then you’ve done it right.