Skip to content
Advertisement

Tag: macos

when installing pyaudio, pip cannot find portaudio.h in /usr/local/include

I’m using mac osx 10.10 As the PyAudio Homepage said, I install the PyAudio using the installation of portaudio seems successful, I can find headers and libs in /usr/local/include and /usr/local/lib but when I try to install pyaudio, it gives me an error that actually it is in /usr/local/include why can’t it find the file? some answers to similar questions

_tkinter TclError: can’t find package Tix

A friend sent me some Tkinter/Tix code, but it was for Python 2: I have Python 3, I have no Tix installed, and program crashes. After some searching I’ve changed the code to: Thats what I found on the internet. I have no idea if this is a right approach. But code still does no run it crashes on I

Getting started with cython on mac os

I wrote a simple program in python: Then I execute this: It was generated a file: main.c And then I tried this: And I have an error: How to compile python to c ? How to get started with cython with xcode on mac ? Answer You have to tell the gcc compiler where is the pyconfig.h file on your

How to find pg_config path

Complete newbie here, trying to set up Django to work with PostgreSQL. I’m using mac osx 10.6.8. I have also installed PostgreSQL 9.3 When I run pip install psycopg2 in terminal I get the following error I’ve seen a number of posts on this how-to-install-psycopg2-with-pip-on-python pg-config-executable-not-found but I have no clue how to find the bin folder location containing pg_config.

Calling AppleScript from Python without using osascript or appscript?

Is there any way to execute (and obtain the results of) AppleScript code from python without using the osascript command-line utility or appscript (which I don’t really want to use (I think?) because it’s no longer developed/supported/recommended)? Rationale: in another question I’ve just posted, I describe a strange/undesired behaviour I’m experiencing with running some AppleScript via osascript. As I’m actually

How to install python library Pyexiv2 and Gexiv2 on osx 10.6.8?

Does anyone knows how to install the python library pyexiv2 and/or Gexiv2 on Mac OSX, ideally on version 10.6.8 and in a virtualenv? Answer It’s pretty simple with Homebrew package manager: If you’re using Macports, it also has exiv2 formulas: http://www.macports.org/ports.php?by=name&substr=exiv –Edit– A side note: I got segfault at “import pyexiv2”. It turned out I have system Python 2.7.2 and

How to check whether screen is off in Mac/Python?

How do I check whether the screen is off due to the Energy Saver settings in System Preferences under Mac/Python? Answer Quick and dirty solution: call ioreg and parse the output. In my computer, the value for CurrentPowerState is 4 when the screen is on and 1 when the screen is off. Better solution: use ctypes to get that information

Mac OS X Python GUI Administrator Prompt

I have an OS X Python application that uses wxPython for it’s GUI controls. I’m looking to prompt the user for administrative rights (akin to using the Authorization Service API in Objective-C) before starting a network service. The closest library I have found is Bob Ippolito’s Authorization library but it is fairly outdated and has compatibility issues with Snow Leopard

Advertisement