osx-lion

“no suitable image found” error when using numpy

孤街浪徒 提交于 2020-01-06 20:52:52
问题 I tried to use NumPy in Terminal, but the system gave me an error message like this: Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/ init .py", line 137, in import add_newdocs File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in from numpy.lib import add_newdoc File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

Can't load mysqlclient.18.dylib into python on Mac OS Lion

半腔热情 提交于 2020-01-06 15:49:13
问题 I want to get MySQL working with the system Python 2.7 in Mac OS X Lion. I know there are a lot of questions very similar to this out there, and in fact my symptom is identical to mysql-python installation problems (on mac os x lion). However, that answer doesn't seem to apply to my case. My Mac is a current MacBook Pro running the 64-bit kernel: % uname -a Darwin Leos-MacBook-Pro.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86

wxPython MacOS X Lion full screen mode

点点圈 提交于 2020-01-05 15:08:32
问题 I am making a wxPython application that needs to work in full screen. I want to use the new full screen mode that came in OS X Lion. How can I make the full screen icon appear on the top right corner? 回答1: Until bug #14357 is fixed, there's no direct way to do this using only wxPython functions that I know of. However, you can bypass wxWidgets and access the Cocoa APIs directly to do what you need. Note that you must be using the wxMac/Cocoa bindings (wxPython 2.9 or above). This is the code

Cannot find include file <mqueue.h> on OS X?

孤街浪徒 提交于 2020-01-05 08:53:50
问题 I am unable to use mqueue.h in mac. When I try to include this header file in my C++ program it says Cannot find include file . Is there a way to use this in mac ? Or are there any universal alternatives to this. I want to use the O_NOBLOCK flag which is present in mqueue.h ? I found out that the IPC message queues have the following restrictions which may be useful before making a decision to use them. Max Number of Msg Queue Identifiers = 16 Max Size of Messages = 8192 (Bytes) Default Max

Why is java not recognized after Oracle JDK 7 is installed in Mac OS Lion [closed]

ぃ、小莉子 提交于 2020-01-05 03:44:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have installed Oracle JDK 7 u21 (64bit) on my Mac OS X Lion 10.8.3 MacBook. Both javac -version and java -version return the correct information on my machine. Now, based on my installation instructions, my friend installed it on her machine. [Note:I have a detailed installation document that I made for this

Unable to install pyenchant-1.6.5 for python 2.7 on Mac OSX Lion

不想你离开。 提交于 2020-01-05 02:52:06
问题 I am not able to install pyenchant for python 2.7 on my Max OSX Lion. I get an error using the dmg installer. I get an error stating that /opt/local/Library/Frameworks Python 2.7 is required. My python 2.7 is installed in /Library/Frameworks 回答1: That installer you are using is expecting there to be a macports version of python installed ( the /opt location ). Just try installing it via easy_install or pip easy_install pyenchant Or pip install pyenchant 回答2: I was able to install pyenchant on

JavaDoc location from Apple Extensions

与世无争的帅哥 提交于 2020-01-04 06:46:09
问题 I'm developing an Java-Application under OS X Lion and i want to use the Apple Extensions in Java 7. My Question is simple: I put the Apple Extensiosn into my Classpath, they are located here: /System/Library/Java but I can't find any JavaDocs in that directory. Where are these Extensions explained? Is there JavaDoc available? Just found that site: http://developer.apple.com/library/mac/#releasenotes/Java/JavaSnowLeopardUpdate3LeopardUpdate8RN/ResolvedIssues/ResolvedIssues.html#//apple_ref

Replace a file using the NSSavePanel in a sandboxed application

我怕爱的太早我们不能终老 提交于 2020-01-04 06:11:42
问题 I create a NSSavePanel using this code: NSSavePanel *savePanel = [NSSavePanel savePanel]; savePanel.delegate = self; savePanel.directoryURL = ...; savePanel.nameFieldStringValue = ...; [savePanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger returnCode) { if (returnCode == NSFileHandlingPanelOKButton) { // the completion handler } }]; If in the save panel the user select an already existing file, appears the alert box "“XXX” already exists. Do you want to replace it?". If

Replace a file using the NSSavePanel in a sandboxed application

眉间皱痕 提交于 2020-01-04 06:11:09
问题 I create a NSSavePanel using this code: NSSavePanel *savePanel = [NSSavePanel savePanel]; savePanel.delegate = self; savePanel.directoryURL = ...; savePanel.nameFieldStringValue = ...; [savePanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger returnCode) { if (returnCode == NSFileHandlingPanelOKButton) { // the completion handler } }]; If in the save panel the user select an already existing file, appears the alert box "“XXX” already exists. Do you want to replace it?". If

iPhone simulator not found

為{幸葍}努か 提交于 2020-01-04 05:34:12
问题 I'm new to Xcode development. I installed Xcode 4.3.1 on my Lion-based mac and unset the hidden flag on ~/Library. I read about the iPhone / iPad simulator here - https://apple.stackexchange.com/questions/31015/how-do-i-run-the-ipad-simulator-to-test-a-website-on-my-mac - and also here iPhone : run .app to iPhone Simulator - but the instructions at this page suggest this path which does not exist on my machine. (I do not have the /Developer folder at all). I presume Xcode 4.3.1 should have