Fixed PATH, still no TeX joy

150 views
Skip to first unread message

gabriel....@gmail.com

unread,
Aug 20, 2016, 12:10:43 AM8/20/16
to mnemosyne-proj-users
I installed Mnemosyne 2.3.6 on El Capitan 10.11.6. If I create a test card with a bit of TeX I get "Problem with latex. Are latex and dvipng installed?"

I searched the docs and found that I should update $PATH. However, echo $PATH shows /opt/local/bin is already at the beginning of my path.

Console shows:
8/19/16 2:27:11.398 PM appleeventsd[55]: SecTaskLoadEntitlements failed error=22
8/19/16 2:27:11.403 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22
8/19/16 2:27:11.407 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22
8/19/16 2:27:13.779 PM Mnemosyne[22880]: WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.6 instead of 10.11.6. This is not a bug in Gestalt -- it is a documented limitation. Use NSProcessInfo's operatingSystemVersion property to get correct system version number.
Call location:
8/19/16 2:27:13.779 PM Mnemosyne[22880]: 0 CarbonCore 0x00007fff987586df ___Gestalt_SystemVersion_block_invoke + 113
8/19/16 2:27:13.780 PM Mnemosyne[22880]: 1 libdispatch.dylib 0x00007fff86d7440b _dispatch_client_callout + 8
8/19/16 2:27:13.780 PM Mnemosyne[22880]: 2 libdispatch.dylib 0x00007fff86d74303 dispatch_once_f + 67
8/19/16 2:27:13.780 PM Mnemosyne[22880]: 3 CarbonCore 0x00007fff986e4fbc _Gestalt_SystemVersion + 987
8/19/16 2:27:13.780 PM Mnemosyne[22880]: 4 CarbonCore 0x00007fff986e47d0 Gestalt + 139
8/19/16 2:27:13.780 PM Mnemosyne[22880]: 5 QtCore 0x0000000107a851ce _ZN19QProcessEnvironment17systemEnvironmentEv + 31744
8/19/16 2:27:13.780 PM Mnemosyne[22880]: 6 QtCore 0x0000000107a6ac64 _ZN9QSettingsC1ERK7QStringS2_P7QObject + 34
8/19/16 2:27:15.047 PM Mnemosyne[22880]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:27:15.048 PM Mnemosyne[22880]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:27:15.048 PM Mnemosyne[22880]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:27:15.049 PM Mnemosyne[22880]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:27:15.049 PM Mnemosyne[22880]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:27:17.102 PM Mnemosyne[22880]: sh: latex: command not found
8/19/16 2:27:17.106 PM Mnemosyne[22880]: sh: dvipng: command not found
8/19/16 2:27:19.091 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22
8/19/16 2:27:19.201 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22


See time 2:27:17-- sh: latex: command not found.

Ok, so I close Mnemosyne and open a shell. I type tex and I get the tex prompt. I type dvipng without parameters and I get Usage, so clearly both are in my path.

Since I have the shell open, I try open -a Mnemosyne. I get the same error from Mnemosyne (Problem with latex) but slightly different console output:

8/19/16 2:40:29.357 PM appleeventsd[55]: SecTaskLoadEntitlements failed error=22
8/19/16 2:40:29.362 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22
8/19/16 2:40:29.369 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22
8/19/16 2:40:31.956 PM Mnemosyne[23258]: WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.6 instead of 10.11.6. This is not a bug in Gestalt -- it is a documented limitation. Use NSProcessInfo's operatingSystemVersion property to get correct system version number.
Call location:
8/19/16 2:40:31.957 PM Mnemosyne[23258]: 0 CarbonCore 0x00007fff987586df ___Gestalt_SystemVersion_block_invoke + 113
8/19/16 2:40:31.957 PM Mnemosyne[23258]: 1 libdispatch.dylib 0x00007fff86d7440b _dispatch_client_callout + 8
8/19/16 2:40:31.957 PM Mnemosyne[23258]: 2 libdispatch.dylib 0x00007fff86d74303 dispatch_once_f + 67
8/19/16 2:40:31.957 PM Mnemosyne[23258]: 3 CarbonCore 0x00007fff986e4fbc _Gestalt_SystemVersion + 987
8/19/16 2:40:31.957 PM Mnemosyne[23258]: 4 CarbonCore 0x00007fff986e47d0 Gestalt + 139
8/19/16 2:40:31.957 PM Mnemosyne[23258]: 5 QtCore 0x0000000107d091ce _ZN19QProcessEnvironment17systemEnvironmentEv + 31744
8/19/16 2:40:31.958 PM Mnemosyne[23258]: 6 QtCore 0x0000000107ceec64 _ZN9QSettingsC1ERK7QStringS2_P7QObject + 34
8/19/16 2:40:33.412 PM Mnemosyne[23258]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:40:33.413 PM Mnemosyne[23258]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:40:33.414 PM Mnemosyne[23258]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:40:33.414 PM Mnemosyne[23258]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:40:33.414 PM Mnemosyne[23258]: libpng warning: iCCP: known incorrect sRGB profile
8/19/16 2:40:35.964 PM Mnemosyne[23258]: tmp.dvi: No such file or directory
8/19/16 2:40:35.964 PM Mnemosyne[23258]: This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
8/19/16 2:40:38.322 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22
8/19/16 2:40:38.405 PM launchservicesd[84]: SecTaskLoadEntitlements failed error=22

So now it looks like at least it found both binaries but I don't know how to address the other messages. Any ideas?

Peter Bienstman

unread,
Aug 20, 2016, 12:14:07 AM8/20/16
to mnemosyne-...@googlegroups.com, Devin Howard
Hi,

Since I don't have a mac myself, I forward this to our osx packager Devin.

Cheers,

Peter

Devin Howard

unread,
Aug 21, 2016, 11:22:37 PM8/21/16
to mnemosyne-proj-users
Hey Gabriel, thanks for the detailed report. I'll bet this is a problem with the way I packaged the app (that is, I didn't include tex in the app!). I can try rebundling the app and updating the build instructions to include TeX support.

Sorry about not doing that before! I never thought to test it since I don't use that feature.

I'll try to get this done this week.

Gabriel Rodriguez

unread,
Aug 22, 2016, 1:24:47 AM8/22/16
to mnemosyne-proj-users
Thank you for the quick reply!  I have solved the issue after many hours.  I hope this will help someone else.  And perhaps these steps will suggest a change for the next build.

First, I found a remark in an earlier thread (thank you petrs) that suggested using full path names for the latex and dvipng commands in ~/Library/Mnemosyne/config.py.

Doing this fixed the shell error "command not found", but then I got a new error:

8/21/16 6:48:40.877 PM Mnemosyne[98179]: tmp.dvi: No such file or directory

So I made a guess that I needed to also explicitly give the path to tmp.dvi. Since I initially did not know the path, I tried to pass a parameter to latex and dvipng that would specify my own temp directory.  That did not work so I fiddled around with latex.py in the package and found that the path is:  ~/Library/Mnemosyne/default.db_media/_latex/tmp.dvi

This got me closer! Alas a new (but final) error emerged:  

8/21/16 7:04:57.836 PM Mnemosyne[98753]: /opt/local/bin/dvipng: Fatal error, PRE does not occur first - are you sure this is a DVI file?

After some additional head banging, I went to the /bin for my installation (MacTeX) and asked ls -L which showed that latex is soft linked to pdftex, which defaults to pdf output.  So I specified the output type and now I have Mnemosyne working without errors!

Before:
# Latex command.
latex = "latex -interaction=nonstopmode"

# Latex dvipng command.
dvipng = "dvipng -D 200 -T tight tmp.dvi"

After:

# Latex command.

latex = "/Library/TeX/texbin/pdflatex -output-format=dvi -interaction=nonstopmode"


# Latex dvipng command.

dvipng = "/Library/TeX/texbin/dvipng -D 200 -T tight ~/Library/Mnemosyne/default.db_media/_latex/tmp.dvi"


The positioning of the latex output looks a little broken but I'm pretty sure the issue is with my latex formatting and has nothing to do with Mnemosyne.

Gabriel Rodriguez

unread,
Aug 22, 2016, 1:36:44 AM8/22/16
to mnemosyne-proj-users
After typing that up I see a possible point of confusion so I will point out that the path for pdflatex and dvipng is from the root (/Library) whereas tmp.dvi lives in the users home directory ~/Library

Peter Bienstman

unread,
Aug 22, 2016, 2:49:37 AM8/22/16
to mnemosyne-...@googlegroups.com

Hi,

 

I’m not so sure packaging latex is a good idea, as it’s a big package and people typically customise it with their own libraries.

 

Perhaps it’s a simple as making sure the system paths are searched?

 

Cheers,

 

Peter

 

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/5a662481-6faf-448e-b259-5401b7394a37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Devin Howard

unread,
Aug 23, 2016, 2:21:13 AM8/23/16
to mnemosyne-...@googlegroups.com
Sounds good, TeX was taking a long time to download anyways!

I'll try to figure out how to make the packaged app search system paths and repackage 2.3.6 in case it comes up for someone else. If I get that done, I'll send Gabriel a message in the hopes that he can test it out :D

You received this message because you are subscribed to a topic in the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mnemosyne-proj-users/M4yEorN8vwQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mnemosyne-proj-u...@googlegroups.com.

To post to this group, send email to mnemosyne-...@googlegroups.com.

Devin Howard

unread,
Dec 6, 2016, 1:18:06 PM12/6/16
to mnemosyne-...@googlegroups.com
Hi Gabriel

I'd be interested to hear about how TeX works with the new 2.4 version. It uses pyinstaller instead of py2app, so the PATH works differently. I had trouble making it access system apps, so if you're able to send any advice, maybe I can fiddle with the code or the packaging to make TeX work better, or make it work at all. Let me know...

gregory....@gmail.com

unread,
Jan 4, 2018, 1:37:58 AM1/4/18
to mnemosyne-proj-users

OSX High Sierra - Mnemosyne 2.6

The config file: ~/Library/Mnemosyne/config.py

needs to be set to:

latex = "/Library/TeX/texbin/latex -output-format=dvi -interaction=nonstopmode"

dvipng = "/Library/TeX/texbin/dvipng -D 200 -T tight tmp.dvi"

The previous answers got me to this working installation


- Greg

Peter Bienstman

unread,
Jan 4, 2018, 3:34:36 AM1/4/18
to mnemosyne-...@googlegroups.com, Devin Howard
Thanks for the info, I forward this to Devin, our Mac OSX developer.

Cheers,

Peter
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mnemosyne-proj-u...@googlegroups.com.
> To post to this group, send email to mnemosyne-proj-
> us...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-users/3ece1e7b-
> 818e-4494-8ac0-43e887eea2ce%40googlegroups.com.

Devin Howard

unread,
Jan 11, 2018, 1:06:20 AM1/11/18
to mnemosyne-proj-users
Greg, thanks for this, and FYI I've posted a pull request which will make these two paths the default (after installing) for macOS users from now on 



On Thursday, January 4, 2018 at 12:34:36 AM UTC-8, Peter Bienstman wrote:
Thanks for the info, I forward this to Devin, our Mac OSX developer.

Cheers,

Peter

> -----Original Message-----
> From: mnemosyne-...@googlegroups.com [mailto:mnemosyne-
> proj-...@googlegroups.com] On Behalf Of gregory....@gmail.com
> Sent: 04 January 2018 04:13
> To: mnemosyne-proj-users <mnemosyne-...@googlegroups.com>
> Subject: Re: [mnemosyne-proj-users] Re: Fixed PATH, still no TeX joy
>
>
> OSX High Sierra - Mnemosyne 2.6
>
> The config file:  ~/Library/Mnemosyne/config.py
>
>  needs to be set to:
>
>  latex = "/Library/TeX/texbin/latex -output-format=dvi -
> interaction=nonstopmode"
>
>  dvipng = "/Library/TeX/texbin/dvipng -D 200 -T tight tmp.dvi"
>
> The previous answers got me to this working installation
>
>
> - Greg
>
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Robert Snarrenberg

unread,
Mar 9, 2021, 5:22:56 PM3/9/21
to mnemosyne-proj-users
Hello,

I just installed Mnemosyne 2.7.3 on Catalina 10.15.7. If I create a test card with a bit of TeX, I get "Problem with latex. Are latex and dvipng installed?"

I edited the config file: ~/Library/Mnemosyne/config.py, as follows:

# Latex command.
latex = "/Library/TeX/texbin/latex -output-format=dvi -interaction=nonstopmode"

# Latex dvipng command.
dvipng = "/Library/TeX/texbin/dvipng -D 200 -T tight tmp.dvi"

This, however, has not solved the problem. I installed the app in "/Appplications" (rather than in "~/Applications"), so I think the path variables here are correct. And I checked the paths to verify that latex and divpng lie in the specified path. 

Any advice?

Thanks.

Robert Snarrenberg
Associate Professor of Music
Washington University in St. Louis

Devin Howard

unread,
Mar 9, 2021, 10:08:06 PM3/9/21
to mnemosyne-proj-users
What happens if you execute the latex command in your terminal? Do you get any messages back? 

Last I tried this (which admittedly was on an older version of macOS), it worked with those paths, so not sure what's different between my environment and yours. Executing the commands in the terminal may help.

You received this message because you are subscribed to a topic in the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mnemosyne-proj-users/M4yEorN8vwQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mnemosyne-proj-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/5e1c7a4b-1355-44f2-b486-4f2ee80c789bn%40googlegroups.com.

Robert Snarrenberg

unread,
Mar 10, 2021, 10:20:05 AM3/10/21
to mnemosyne-proj-users
Thanks. 

It turns out that the paths were fine, but I had to restart Mnemosyne to load the edited config file.

Devin Howard

unread,
Mar 10, 2021, 10:37:09 AM3/10/21
to mnemosyne-proj-users
Reply all
Reply to author
Forward
0 new messages