Python is a programming language that is included in the standard OSX installation.

learn more… | top users | synonyms

2
votes
2answers
2k views

How can I tell Firewall to allow incoming connections for Python.app running Django

Each time I run my Django development server, I get a dialog to allow incoming connections. No matter what I do : Click Allow in the dialog box Add to the Firewall via the OS X GUI (both real and ...
51
votes
9answers
43k views

How to use pip after the El Capitan Max OS X upgrade?

After the El Capitan update, I am unable to run pip install. The error I get is that the "operation is not permitted" when pip tries to create new folders while installing. creating ...
0
votes
0answers
5 views

run python on Xcode but get “/usr/bin/python: can't find '__main__' module in “xxx” ” [on hold]

I just wrote simple codes,like print 'hhh' but always get: /usr/bin/python: can't find 'main' module in "xxx" I know if I'm using sublime,the problem may be that I didn't save it. But I'm using ...
2
votes
3answers
2k views

Linking python as external build tool in Xcode 7 El Capitan

I have been using Xcode 7 as my default python editor for some time now. The usual method to run python from Xcode is given here ...
0
votes
2answers
30 views

How to color the Python syntax in nano

I have been using nano a lot recently to code on Python. I have been flying by on it all until this little stump, no color... it makes it harder to know if you got the syntax right and harder to code! ...
0
votes
1answer
34 views

How to clean pip installed packages on MacOSX?

I try to remove all pip installed packages from MacOSX. I'm doing it to ensure I'm using homebrew pip from now on (to avoid problems with SIP). Following zsh loop removed most of them, but some ...
0
votes
1answer
32 views

Python 2.6 and 2.7 in Mac OS X

In my /usr/bin, the following is the result of ls -al python*: -rwxr-xr-x 1 root wheel 66480 Dec 3 01:36 python -rwxr-xr-x 5 root wheel 925 Aug 22 2015 python-config lrwxr-xr-x 1 root ...
0
votes
1answer
50 views

Calling Python 3 script from AppleScript

I have a Python 3 script that I'd like to add as a Service using Automator. The idea is that I can right click on a text file, and an option will display to run my script on said file. The shebang ...
0
votes
0answers
16 views

Hide files of single extension from command line in Python

My script is as follows (and used to work but no longer does): #!/usr/bin/env python # encoding: utf-8 import os, subprocess path = "/path/to/dir/" # write your own path here hide_files = True for ...
0
votes
0answers
105 views

How to Install PIL in El Capitan with Pip?

I would like to install PIL by Pip but the code is unsuccessful pip install PIL Collecting PIL Could not find a version that satisfies the requirement PIL (from versions: ) No matching distribution ...
1
vote
1answer
103 views

Mac OS X Terminal creates zero byte files

I'm a font developer. I want to merge a DSIG code into a TrueType format (TTF) font, which makes it compatible with Microsofts applications that use OpenType features. I have had this working before ...
0
votes
2answers
40 views

Python socket program taking forever to run

I tried to run following program on my Mac terminal. import socket mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mysock.connect(('www.py4inf.com', 80)) mysock.send('GET ...
4
votes
3answers
315 views

Make a python program an application

I would like to make a Python program executable, like in Windows, when you use a program like cx_Freeze to make Python programs become .exe. I would like to do the same for Mac, I would like to make ...
0
votes
0answers
19 views

Script, Workflow, or shortcut to change URL

My work has a proxy service that I need to use to access certain websites. Basically it adds extra parts the website url (after I've logged in)- I need to add something like proxy.go.com right before ...
0
votes
0answers
17 views

Running brew doctor shows I have 3 different python “config” scripts installed. How do I get rid of them so that I no longer receive this warning?

I have been told that there is a default Python installed on OSX, and that deleting it will cause SEVERE system issues, however, I want to clear these warnings in brew doctor. This is what the ...
1
vote
1answer
46 views

Homebrew and usr/local/include/ question

I am trying to install python3 with homebrew and I would like to know if I can delete these files. After running brew doctor, I get this message: Unexpected header files: ...
4
votes
2answers
508 views

How best to isolate my development environment on OS X?

What is the current best practice for setting up a development environment on OS X? I recently got a new Mac with OS X 10.10, Yosemite. I'm familiar with homebrew, and from my Linux experience, ...
1
vote
0answers
40 views

How do you homebrew cleanup except to skip specified formula?

In Homebrew, to clean up outdated packages, we do brew cleanup, and currently I have about 9.5GB worth of old packages, pending for removal. However, I really do not like to remove old python ...
0
votes
0answers
72 views

Pygame Error- Deprecated Carbon Component Manager Error

I'm trying to use Pygame for school and up until now I have been using Linux and Window, but I recently tried using it on OSX, and now I'm getting this error:2016-02-29 10:40:47.196 Python[1092:16106] ...
5
votes
2answers
7k views

How to create a VPN connection via terminal?

I have a macbook pro with mavericks running. I am looking for a way to connect to a VPN network in terminal. The reason why I want to do this is that I want to write a small program in Python which ...
4
votes
3answers
16k views

What version(s) of Python are pre-installed on OS X 10.9 Mavericks?

In the past Python 2.6 was included with OS X 10.8. What version or versions come with 10.9 Mavericks?
0
votes
1answer
94 views

Issue with Homebrew when trying to parallelly install Python 3.x

I am trying to install Python v.3.x in parallel with the already installed Python v.2.7.10. I'm following the procedure explained in this tutorial which I found on YouTube. Despite it seems not an ...
1
vote
0answers
35 views

Apple Server.app not showing website

I have tried to host a Django WebApp (app.example.com) following this tutorial: http://jelockwood.blogspot.de/2013/06/running-django-webapps-with-os-x.html The WebApp will be hosted next to a ...
3
votes
1answer
98 views

TextWrangler running Python 2.7 after I removed it from my Mac

I have removed Python 2.7 from my machine, using instructions provided here: How to uninstall Python 2.7 on a Mac OS X 10.6.4? (Using the top voted/accepted answer's instructions) However, when I run ...
1
vote
1answer
64 views

Trouble Installing Pygame on Mac - error code 255 in None

I need to install pygame on my MacBook for a class, I was able to get it installed fine on my Windows machine, but the OSX installation process has been much rougher. The error I'm getting when try ...
2
votes
1answer
46 views

Force a specific version of a framework for a process

So I think it's known that OS X 10.10.5 breaks calendar server because of incompatibilities between the version of Python on 10.10.5 and a specific part of the Calendar Server. It does work in 10.10.3 ...
1
vote
1answer
83 views

How do I tell the MacPorts Python to look in /opt/local/lib for dylibs?

I'm running a Python script with the MacPorts version of Python (2.7), i.e, I've run: port select --set python python27 However, when I run my script, it can't find a dylib in /opt/local/lib: ...
0
votes
2answers
3k views

Can't create virtualenv

I want to create a virtualenv but it doesn't find the command. $ virtualenv venv -bash: virtualenv: command not found It is installed: $ pip install virtualenv Requirement already satisfied (use ...
-1
votes
1answer
87 views

Can’t install scikit-learn for python on Mac - wrong directory

I’m tearing my hair out! (Not much left!) When I run easy_install -U scikit-learn as admin I get the following error: Admin$ easy_install -U scikit-learn error: can't create or remove files in ...
0
votes
0answers
67 views

use python to mount smb share from osx including special characters in the password field

I've seen plenty of scripts for mounting a smb share in osx via terminal and python. I'm working toward the python solution using the answer at the end of this similar question. The only issue I ...
1
vote
1answer
61 views

Cannot bind 127.0.0.123 to tcp socket python

I'm trying to learn TCP sockets for my project. I will be using them to transfer files between computers. The server client combo copied from some tutorial runs fine as long, as the ip I'm trying to ...
0
votes
0answers
246 views

I get a permission denied error when trying to run pip

I am trying to run the following command: pip install -U pip setuptools However, I get this error output: Requirement already up-to-date: pip in /Library/Python/2.7/site-packages Collecting ...
0
votes
0answers
66 views

Google Earth Pro randomly crashing on El Capitan (“EXC_BAD_ACCESS (SIGSEGV)”)

And I do mean randomly, sometimes I do the exact same thing and I can't reproduce this error, but it happens enough to make me look like an amateur at work sometimes. It didn't do this in Mavericks I ...
3
votes
1answer
40 views

Python-based app requires bypassing 'unknown developer' warning

Using a Python utility called py2app, I've built a distributable .app. from a Python-based project. It launches fine (when double-clicked) on my own machine, yet when tried elsewhere (other users on ...
2
votes
2answers
170 views

pygame installed through homebrew does not work?

I ran brew install pygame, it installed it together with all the dependencies. Python v2.7.10 / OS X version 10.11.2 Whenever I import pygame in a script it says this Traceback (most recent call ...
0
votes
0answers
31 views

Upgrading from Python to 2.7.10 to 2.7.11 on OSX

How can I upgrade Python from 2.7.10 to 2.7.11 on OSX (Yosemite)?
1
vote
0answers
58 views

Will upgrading to 10.11 restore tkinter or do I need to reset to factory settings?

It is my understanding that OS X comes with some sort of tkinter already installed. I believe I deleted this while trying to restore matplotlib (see my current problem posted to SO). If I upgrade from ...
1
vote
2answers
59 views

The “python” CLI executable seems to ignore path hierarchy

I have the following strange situation on my (freshly installed El Capitan, otherwise empty) Mac. I noticed that /usr/bin/python defaults to python 2.7 (still), and the new SIP security system ...
0
votes
0answers
41 views

TV show filename format for automatic handling by iTunes

Is there a format of filenames for TV show mp4 files, such as 'S#E# - EpisodeTitle.mp4' that iTunes detects and automatically update the metadata and sort the files accordingly in my library? I hate ...
1
vote
0answers
42 views

cv2 module not found

I installed OpenCV 2.4.X using Homebrew on my MacBook Pro OS X El Capitan, but when I try to run a program in Python 2.7.X I get this error: ImportError: No module named cv2 I have looked ...
0
votes
0answers
16 views

How to figure out which exact python app regularly results in crashes of Python.app?

I have several python (server) apps running on my Macbook. One of them regularly crashes on my system, resulting in a desktop notification popup with the message: Python quit unexpectedly. Checking ...
2
votes
0answers
25 views

How to debug .app that only successfully launches from Terminal?

Recently, my Dropbox.app stopped launching correctly. If I double-click on the app or try to launch via spotlight, the app just silently dies within a second. I see it show up in Activity Monitor, but ...
5
votes
2answers
3k views

Install and import site-packages for Python 2 and 3 on Mac

I installed brew and then brew install python brew install python3 Install flask with pip pip install flask Try python -c 'import flask' But I got exception ImportError: No module named ...
0
votes
1answer
126 views

How do I open a file in textwrangler?

I'm learning how to code in Python using TextWrangler as my text editor (using OS X), and I've been unable to open any files. Here's how I want to open the files: file = open("genomic_dna.txt") ...
1
vote
1answer
196 views

Is Xcode the ideal IDE for most development needs, or is app/web/shell/script development not as narrowly approached? [closed]

I'm pretty fluent in the basics of web based languages i.e., HTML(5), CSS(3), php, MySQL, Javascript; although now I'm diving deeper and starting to tackle scripting (Mostly Python and Ruby) & ...
0
votes
1answer
93 views

Can this model of MacBook Pro satisfy my scientific needs?

I've recently decided to buy a 13-inch MacBook Pro. Although this costs me a lot, first-time experiencing this machine could be very interesting for me. Its weight is the other reason that attracts ...
0
votes
0answers
84 views

running python script of global keyboard shortcut in OSx

Hi I wrote a python script to get the size of the file of which I have URL I copied from browser or anywhere; I wanted to create a global keyboard shortcut so I tried to create using Automator > ...
2
votes
0answers
224 views

Command line tool for interacting with Bluetooth Low Energy devices, similar to gatttool

I've just found out that some Python code I've got working on Linux also needs to work on OSX. For reliability reasons, on Linux I've been using a cludgy but effective approach to reading and writing ...
22
votes
2answers
12k views

How to compile mod_wsgi, mod_fastcgi, etc on Mountain Lion (Mavericks) by fixing `apxs:Error: Command failed with rc=65536`?

I've updated to OS X Mountain Lion. Update has removed all of my python and apache modules including mod_wsgi. Now I'm trying to recompile mod_wsgi (it compiled without problems on Lion). I use ...
9
votes
2answers
10k views

iTerm2 doesn't read com.googlecode.iterm2.plist

I am iTerm2 (1.0.0) user. I know how to create profiles, by using iTerm settings or modifying com.googlecode.iterm2.plist file. For convenience, I will use .plist to indicate ...