osx-snow-leopard

Install Python 2.7.1 side-by-side with Apple-supplied Python

僤鯓⒐⒋嵵緔 提交于 2019-11-27 13:22:32
问题 I have just downloaded the Python 2.7.1 DMG from Python.org. I have seen suggestions to get ActivePython, but I would prefer the one from Python.org. If I just run the mpkg installer inside the DMG, accepting all defaults, will it live peacefully with the Apple-supplied Python? If I type python in Terminal, which one will I get? In Terminal, how do I specify to run the Apple-supplied Python? What about the Python I installed myself? What are these talk about setting the PATH when installing a

Trouble on setting the git 'core.editor'

拈花ヽ惹草 提交于 2019-11-27 12:56:04
I am trying to set git on my Mac Os Snow Leopard 10.6.7 but I made some errors on doing that... At this time I have the following warning : $ git config --global core.editor EDITOR=/usr/bin/vim error: More than one value for the key core.editor: mate $ git config --global core.editor open warning: core.editor has multiple values How can I solve that? And, mostly, how can I set the core.editor to TextEdit and make it works? P.S.: I already read this question . The easiest way is to change the environment variable EDITOR to point to mate. In your .bash_profile add the following: export EDITOR="

Django + MySQL on Mac OS 10.6.2 Snow Leopard

假如想象 提交于 2019-11-27 11:44:07
There were some excellent answers to this question already, however, they are now outdated. I've been able to get the module installed, but "python manage.py runserver" fails with iMac:myproject drhoden$ python manage.py runserver Validating models... Unhandled exception in thread started by <function inner_run at 0x10496f0> Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run self.validate(display_num_errors=True) File "/Library/Frameworks/Python.framework

Homebrew install permissions issue

Deadly 提交于 2019-11-27 10:18:09
问题 I have a standard homebrew install inside of usr/local/ When I try: Larson-2:~ larson$ brew install postgresql Error: Cannot write to /usr/local/Cellar And when I use sudo: Larson-2:~ larson$ sudo brew install postgresql Cowardly refusing to `sudo brew install' What am I doing wrong? 回答1: You somehow have limited permissions to /usr/local/Cellar . Brew doesn't like to install with sudo which is why it refuses. Check the permissions: ls -ld /usr/local/Cellar Open them up for writing: sudo

How to create a helper application (LSUIElement) that also has a (removable) dock icon

无人久伴 提交于 2019-11-27 06:54:59
问题 I've submitted a helper application (using LSUIElement)to the Mac App Store. I was under the false impression that the App Store install process would put a dock icon for helper apps. How can I create a dock icon that the user could remove, while the status bar app runs independently (like the popular app Caffeine)? Do I need to create a non-LSUIElement app that loads the LSUIElement app, or is there a better way? 回答1: Instead of using LSUIElement, use NSApplication's setActivationPolicy:

How to install java jdk 7 on Snow Leopard

倾然丶 夕夏残阳落幕 提交于 2019-11-27 06:26:35
My Mac currently is running Snow Leopard (10.6.8), and I would like to develop with Java 7. I downloaded the Java 7 OS X installer from Oracle's website , started to run it. Unfortunately, I was immediately greeted with a message that said the installer is supported only on OS X Lion (10.7.3). Is there any way I can get Java 7 on my machine with Snow Leopard? I am not buying a new OS just to upgrade my Java. I googled around some, but I am not finding much. I'm hoping I can find some help here. Thanks. Use Pacifist from http://www.charlessoft.com/ to open and install the 'JDK 7 Update X.pkg'

rake db:create - collation issues

隐身守侯 提交于 2019-11-27 06:15:58
问题 kratos-iii:railsproj zachinglis$ rake db:create (in /Users/zachinglis/Sites/rails/railsproj) Couldn't create database for {"adapter"=>"mysql", "host"=>"localhost", "username"=>"root", "password"=>nil, "database"=>"railsproj_development"}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation) I had no issues using Sequel Pro and even creating said database. How do I resolve this? Having an empty password never gave me issues before

Equivalent of strace -feopen < command > on mac os X

烂漫一生 提交于 2019-11-27 05:53:16
This is useful for debugging (hence programming related). On linux, we can use the command strace -feopen python myfile.py to figure out which python modules and shared objects are loaded. Is there an equivalent one-liner on macOS X? I suppose you meant strace -fetrace=open ? dtruss -f -t open python myfile.py 来源: https://stackoverflow.com/questions/1925978/equivalent-of-strace-feopen-command-on-mac-os-x

Detecting when a space changes in Spaces in Mac OS X

家住魔仙堡 提交于 2019-11-27 05:23:07
问题 Let's say I want to write a simple Cocoa app to make the Spaces feature of Leopard more useful. I would like to configure each space to have, say, different screen resolutions keyboard layouts volume (for audio) So there are two parts to my question: I suppose there are ways to modify these three things independently of Spaces, right? If so, how? How can I detect in my app when a space change occurs, and when that happens, determine what space the user just switched to? Does Leopard send out

Installing Python Imaging Library (PIL) on Snow Leopard with updated Python 2.6.2

こ雲淡風輕ζ 提交于 2019-11-27 05:22:17
问题 I have a fresh install (started with a wiped drive) of Snow Leopard with the developer tools installed during the Snow Leopard installation. I then installed Python 2.6.2, replacing the Snow Leopard default python 2.6.1. I've tried to install PIL by: easy_install pip downloading source and running python setup.py build manually. All yield the same error (link to pip log: http://drop.io/gi2bgw6). I've seen others have had success installing PIL using the Snow Leopard default python 2.6.1, so I