installing on Mac OS X

133 views
Skip to first unread message

Patrick

unread,
Aug 30, 2011, 9:17:34 AM8/30/11
to mnemosyne-proj-users
I'm having some trouble installing on Mac OS X and I'd appreciate some
guidance as to whether it's a bug or something I'm doing wrong.

I have all of the dependencies installed (using MacPorts) and I ran
sudo make setup
sudo make

Which gave me this:
Installed /Volumes/Ocean/Users/patrick/mnemosyne-proj/mnemosyne
Processing dependencies for Mnemosyne==2.0-pre
Finished processing dependencies for Mnemosyne==2.0-pre
./bin/mnemosyne -d dot_mnemosyne2
Uncaught exception!
Traceback (innermost last):
File "./bin/mnemosyne", line 7, in <module>
execfile(__file__)
File "/Volumes/Ocean/Users/patrick/mnemosyne-proj/mnemosyne/
mnemosyne/pyqt_ui/mnemosyne", line 122, in <module>
mnemosyne.initialise(data_dir=data_dir, filename=filename)
File "/Volumes/Ocean/Users/patrick/mnemosyne-proj/mnemosyne/
mnemosyne/libmnemosyne/__init__.py", line 157, in initialise
Upgrade1(self.component_manager).run()
File "/Volumes/Ocean/Users/patrick/mnemosyne-proj/mnemosyne/
mnemosyne/libmnemosyne/upgrades/upgrade1.py", line 36, in run
self.upgrade_from_old_data_dir(old_data_dir)
File "/Volumes/Ocean/Users/patrick/mnemosyne-proj/mnemosyne/
mnemosyne/libmnemosyne/upgrades/upgrade1.py", line 56, in
upgrade_from_old_data_dir
config_file = file(join(old_data_dir, "config"), "rb")
IOError: [Errno 2] No such file or directory: u'/Volumes/Ocean/Users/
patrick/Library/Mnemosyne_1/config'


If I close the error message that pops up and try to make the program
again, I get error messages in this sequence:
"Unable to load file, query failed"
"Creating temporary database"
and the the uncaught exception above


If I try running the program directly, I get this error:


lightning:mnemosyne patrick$ mnemosyne
Traceback (most recent call last):
File "/usr/local/bin/mnemosyne", line 5, in <module>
pkg_resources.run_script('Mnemosyne==2.0-pre', 'mnemosyne')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/
Extras/lib/python/pkg_resources.py", line 489, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/
Extras/lib/python/pkg_resources.py", line 1207, in run_script
execfile(script_filename, namespace, namespace)
File "/Library/Python/2.7/site-packages/Mnemosyne-2.0_pre-py2.7.egg/
EGG-INFO/scripts/mnemosyne", line 15, in <module>
from PyQt4.QtGui import QApplication
ImportError: No module named PyQt4.QtGui


However, if I then open a python terminal prompt and type
import PyQt4.QtGui
I am able to load the module.


Any ideas?


Regards,
Patrick

Peter Bienstman

unread,
Aug 30, 2011, 9:44:04 AM8/30/11
to mnemosyne-...@googlegroups.com
On Tuesday, August 30, 2011 03:17:34 PM Patrick wrote:
> I'm having some trouble installing on Mac OS X and I'd appreciate some
> guidance as to whether it's a bug or something I'm doing wrong.

> IOError: [Errno 2] No such file or directory: u'/Volumes/Ocean/Users/
> patrick/Library/Mnemosyne_1/config'

Can you restore your u'/Volumes/Ocean/Users/patrick/Library/Mnemosyne
directory to what it was before the update, and help me debug some things
here?

mnemosyne/mnemosyne/libmnemosyne/upgrades/upgrade1.py

More specifically, the function backup_old_dir() should have moved your
Library/Mnemosyne directory to a Library/Mnemosyne_1 directory before the
update.



> However, if I then open a python terminal prompt and type
> import PyQt4.QtGui
> I am able to load the module.

This seems like a mac specific thing. Perhaps Ullrich can help?

Peter

Patrick

unread,
Aug 30, 2011, 10:15:11 AM8/30/11
to mnemosyne-proj-users
> Can you restore your  u'/Volumes/Ocean/Users/patrick/Library/Mnemosyne
> directory to what it was before the update, and help me debug some things
> here?

Actually, Mnemosyne was never installed on this Mac, so there was no
directory to be moved. I deleted the Mnemosyne_1 directory; what else
should I do?

> mnemosyne/mnemosyne/libmnemosyne/upgrades/upgrade1.py

I executed this script manually but it didn't seem to do anything. (I
assume it shouldn't, since I have no Mnemosyne data.)


Regards,
Patrick

Peter Bienstman

unread,
Aug 30, 2011, 2:48:54 PM8/30/11
to mnemosyne-...@googlegroups.com
> > Can you restore your u'/Volumes/Ocean/Users/patrick/Library/Mnemosyne
> > directory to what it was before the update, and help me debug some things
> > here?
>
> Actually, Mnemosyne was never installed on this Mac

Ah, that's probably the reason. Could you delete the Library/Mnemosyne and
Library/Mnemosyne_1 and try again with the latest version?



> > mnemosyne/mnemosyne/libmnemosyne/upgrades/upgrade1.py
>
> I executed this script manually but it didn't seem to do anything. (I
> assume it shouldn't, since I have no Mnemosyne data.)

Actually, I was referring to doing some debugging by adding some print
statements to that file, etc, ..., but I think the latest commit fixes this.

Peter

Patrick

unread,
Aug 30, 2011, 6:48:54 PM8/30/11
to mnemosyne-proj-users
The latest version installed properly!

Thank you!


Patrick

eyeorama

unread,
Feb 2, 2015, 1:15:55 PM2/2/15
to mnemosyne-...@googlegroups.com
I have a similar problem, and I am unsure how the remedy previously outlined in this thread works, or if it applies to my situation. I am trying to install Mnemosyne 2.3.1 on my Mac running Snow Leopard. I am currently running Mnemosyne 2.2. I believe I have upgraded from a previous Mnemosyne version, because I have in my Library folder both Mnemosyne and Mnemosyne_1 directories. I am very hesitant to mess with these, since I have been a Mnemosyne user for many years and I have thousands of cards. My main interest in upgrading was to use sync to backup my database and not lose learning data. (I tried a while back to import into the newer version of Mnemosyne running on a Debian machine, and I couldn't get it to work. I thought syncing would be better than import/export)

I first followed the instructions at http://mnemosyne-proj.org/os-x-installation , but when I looked at the README that came in the tarball and the final instructions were different. I went with the README, which in retrospect seems like a mistake. Instead of running 'sudo make osx' in the unpacked source directory, I ran 'sudo port select python python27', then 'python setup.py install' as root. When I try to run the program by typing 'mnemosyne,' I get the following errors:

Traceback (innermost last):

  File "/usr/local/bin/mnemosyne", line 5, in <module>
    pkg_resources.run_script('Mnemosyne==2.3.1', 'mnemosyne')
  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/Mnemosyne-2.3.1-py2.6.egg/EGG-INFO/scripts/mnemosyne", line 101, in <module>

 ImportError: No module named PyQt4.QtGui
An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):

  File "/usr/local/bin/mnemosyne", line 5, in <module>
    pkg_resources.run_script('Mnemosyne==2.3.1', 'mnemosyne')
  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/Mnemosyne-2.3.1-py2.6.egg/EGG-INFO/scripts/mnemosyne", line 101, in <module>

 ImportError: No module named PyQt4.QtGui

When I open IDLE, I have no problem importing the PyQt4.QtGui module.

Do I need to retrace my steps and follow the instructions at http://mnemosyne-proj.org/os-x-installation ? If so, is there an uninstall script? Or is there some other problem?

I appreciate your help.

J

Peter Bienstman

unread,
Feb 3, 2015, 4:04:41 AM2/3/15
to mnemosyne-...@googlegroups.com
Hi,

I'd suggest running the instructions on the website first.

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/e4801792-
> 858e-402b-abf9-e028d7183a15%40googlegroups.com
> <https://groups.google.com/d/msgid/mnemosyne-proj-users/e4801792-
> 858e-402b-abf9-
> e028d7183a15%40googlegroups.com?utm_medium=email&utm_source=foo
> ter> .
> For more options, visit https://groups.google.com/d/optout.


eyeorama

unread,
Feb 3, 2015, 2:11:46 PM2/3/15
to mnemosyne-...@googlegroups.com
I deleted everything except the tarball, and the unpacked it again with tar -zxvf Mnemosyne-2.3.1.tar.gz

The instructions then say to go into 'the unpacked source directory' and run the command 'sudo make osx'.

I couldn't find a specific /src directory, so I assume that I need to go into root directory of the newly unpacked tree,
/Mnemosyne-2.3.1

I did this, ran the command, and got the following error:

make: *** No rule to make target `osx'.  Stop.

I thought I might have the wrong directory, but got the same error when running the command in /Mnemosyne-2.3.1/mnemosyne

Am I in the wrong directory, or am I doing something else wrong?

I appreciate the help,

J

Peter Bienstman

unread,
Feb 4, 2015, 8:26:59 AM2/4/15
to mnemosyne-...@googlegroups.com
Oops, the current linux tarball does not contain the makefile needed for OSX.

I'll fix this for the next release, but meanwhile, just copy the attached makefile to be in the same location as setup.py.

Good luck!
> x- <http://mnemosyne-proj.org/os-x->
> > http://mnemosyne-proj.org/os-x-installation <http://mnemosyne-
> proj.org/os-x-installation> ? If so, is there an uninstall
> > email to mnemosyne-proj-u...@googlegroups.com
> <javascript:> .
> > To post to this group, send email to mnemosyne-proj-
> > us...@googlegroups.com <javascript:> .
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792- <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792->
> > 858e-402b-abf9-e028d7183a15%40googlegroups.com
> <http://40googlegroups.com>
> > <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792- <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792->
> > 858e-402b-abf9-
> >
> e028d7183a15%40googlegroups.com?utm_medium=email&utm_source=foo
> <http://40googlegroups.com?utm_medium=email&utm_source=foo>
> > ter> .
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout> .
>
>
>
>
> --
> 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/9ff0867c-1f0a-
> 4a67-9c3d-568c04966547%40googlegroups.com
> <https://groups.google.com/d/msgid/mnemosyne-proj-users/9ff0867c-
> 1f0a-4a67-9c3d-
> 568c04966547%40googlegroups.com?utm_medium=email&utm_source=foo
makefile

eyeorama

unread,
Feb 4, 2015, 2:21:53 PM2/4/15
to mnemosyne-...@googlegroups.com
I copied the attachment, and saved it under the file name 'makefile' and put it in the same directory as setup.py, and ran the 'sudo make osx' command again. I got the following error:

makefile:3: *** empty variable name.  Stop.

I googled this error, but everything I wasn't able to figure out how to fix it.
> <javascript:> .
>         > To post to this group, send email to mnemosyne-proj-
>         > us...@googlegroups.com <javascript:> .
>         > To view this discussion on the web visit
>         > https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792- <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792->
>         > 858e-402b-abf9-e028d7183a15%40googlegroups.com
> <http://40googlegroups.com>
>         > <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792- <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/e4801792->
>         > 858e-402b-abf9-
>         >
> e028d7183a15%40googlegroups.com?utm_medium=email&utm_source=foo
> <http://40googlegroups.com?utm_medium=email&utm_source=foo>
>         > ter> .
>         > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout> .
>
>
>
>
> --
> 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

Peter Bienstman

unread,
Feb 5, 2015, 2:47:26 AM2/5/15
to mnemosyne-...@googlegroups.com, Patrick Kenny
Hi,

It looks like your environment does not pick up the location of the Python executable.

Since I don't have a Mac myself, I put Patrick (who wrote these instructions) in CC. Hopefully he can help.

Cheers,

Peter

> -----Original Message-----
> From: mnemosyne-...@googlegroups.com [mailto:mnemosyne-
> proj-...@googlegroups.com] On Behalf Of eyeorama
> Sent: 04 February 2015 20:22
> To: mnemosyne-...@googlegroups.com
> Subject: Re: [mnemosyne-proj-users] Re: installing on Mac OS X
>
> > x- <http://mnemosyne-proj.org/os-x- <http://mnemosyne-
> users+un...@googlegroups.com <javascript:>
> > <javascript:> .
> > > To post to this group, send email to mnemosyne-proj-
> > > us...@googlegroups.com <javascript:> .
> > > To view this discussion on the web visit
> > > https://groups.google.com/d/msgid/mnemosyne-proj-
> <https://groups.google.com/d/msgid/mnemosyne-proj->
> > users/e4801792-
> <https://groups.google.com/d/msgid/mnemosyne-proj-
> <https://groups.google.com/d/msgid/mnemosyne-proj->
> > users/e4801792->
> > > 858e-402b-abf9-e028d7183a15%40googlegroups.com
> <http://40googlegroups.com>
> > <http://40googlegroups.com>
> > > <https://groups.google.com/d/msgid/mnemosyne-proj-
> <http://40googlegroups.com?utm_medium=email&utm_source=foo
> <http://40googlegroups.com?utm_medium=email&utm_source=foo> >
> > > ter> .
> > > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout> > .
> >
> >
> >
> >
> > --
> > 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
> <javascript:> .
> > To post to this group, send email to mnemosyne-proj-
> > us...@googlegroups.com <javascript:> .
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/mnemosyne-proj-
> users/9ff0867c-1f0a- <https://groups.google.com/d/msgid/mnemosyne-
> proj-users/9ff0867c-1f0a->
> > 4a67-9c3d-568c04966547%40googlegroups.com
> <http://40googlegroups.com>
> > <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/9ff0867c- <https://groups.google.com/d/msgid/mnemosyne-proj-
> users/9ff0867c->
> > 1f0a-4a67-9c3d-
> >
> 568c04966547%40googlegroups.com?utm_medium=email&utm_source=foo
> <http://40googlegroups.com?utm_medium=email&utm_source=foo>
> > ter> .
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout> .
>
>
>
> --
> 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/5de595b0-
> aa48-4478-a115-b4e4bd85cec1%40googlegroups.com
> <https://groups.google.com/d/msgid/mnemosyne-proj-users/5de595b0-
> aa48-4478-a115-
> b4e4bd85cec1%40googlegroups.com?utm_medium=email&utm_source=foo

Patrick Kenny

unread,
Feb 5, 2015, 2:49:35 AM2/5/15
to Peter Bienstman, mnemosyne-...@googlegroups.com
How did you install the dependencies?


Best,
Patrick

Andrew McConvey

unread,
Feb 8, 2015, 11:30:03 PM2/8/15
to mnemosyne-...@googlegroups.com, Peter.B...@ugent.be
Hi,

Thank you for the quick response Peter.  The missing makefle was definitely an issue.Unfortunately I am now getting the same error as eyeorama:
"Makefile:8: *** empty variable name. Stop."  Perhaps he was able to solve the issue?

I installed the dependencies as suggested on the webpage, using the command "sudo port install bzr python27..."

Best,
Andrew

Peter Bienstman

unread,
Feb 9, 2015, 5:57:31 AM2/9/15
to Andrew McConvey, mnemosyne-...@googlegroups.com, Patrick Kenny
Hi,

Best to contact Patrick on this..

Cheers,

Peter

Patrick Kenny

unread,
Feb 12, 2015, 5:57:47 AM2/12/15
to mnemosyne-...@googlegroups.com, amcc...@gmail.com, ptmk...@gmail.com
I'm sorry for the delay.  My Mac is in for repairs, so I've been unable to look at this.  It will probably be another week before I get it back.

eyeorama

unread,
Feb 12, 2015, 11:34:44 AM2/12/15
to mnemosyne-...@googlegroups.com, amcc...@gmail.com, ptmk...@gmail.com
I still haven't been able to figure out a solution, mostly because I am out of my depth. I did some searching for the error message, but nothing directly on point seemed to come up. I know virtually nothing about make and makefiles, so I don't really know what to try. 
Reply all
Reply to author
Forward
0 new messages