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

learn more… | top users | synonyms

2
votes
1answer
52 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
156 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
1answer
4k 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
171 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
109 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
101 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
315 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
93 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
61 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
447 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
34 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
75 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
68 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
54 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
67 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
26 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 ...
5
votes
2answers
4k 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
184 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
453 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
107 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 me....
0
votes
0answers
108 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
311 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 ...
10
votes
2answers
11k 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 com.googlecode.iterm2....
0
votes
0answers
15 views

How can I install Dedalus using MacPorts?

Ive installed all the necessary MacPorts versions of the dependency packages listed on this page. When I run the bash install.sh installation script, it fails while installing scipy (which...I've ...
0
votes
0answers
16 views

Folder as Volume workflow

I need a way to take any local folder and make it behave just as a local mount drive. I have been using symlinks in the Volumes/ folder, but they need to be recreated after reboot. I need a solid ...
0
votes
0answers
233 views

Why is OSX python sys.path influenced by how python executed from the shell?

Using: OSX 10.10.5 (Yosemite) Python 2.7.10 (installed via the latest System update). XCode is installed. Using bash. Running from a bash shell, I found this surprising behavior I don't understand:...
0
votes
1answer
88 views

Python interpreter crashes on execution

having bought my first macbook I am not very experienced in debugging the libraries and a bit at a loss. Upon execution of my python script the following error report shows up: Process: ...
5
votes
1answer
602 views

Using python screws up the shell (and/or terminal?)!

The problem Simply opening and closing the Python sub-shell screws up my shell (or possibly the terminal?). It seems to remove the shell's ability to print any text I enter, including newlines after ...
2
votes
0answers
122 views

python2.7 cannot be opened because of a problem

Running into an odd issue when my system starts up: I have not been able to track the point of failure down yet. I assume that it is some application that is attempting to start at system startup, ...
1
vote
1answer
90 views

Running a script as root and presenting a GUI to logging in users

I am having a programming decision problem and hope, that you can show me a solution or tell me, if my plan on how to solve the problem would be okay or not. I am managing some macs and want to run ...
1
vote
1answer
113 views

No commands installed from pip work in Terminal

I've been learning python and tried to install pep8, restviewer and other command line apps but when i try to run them, it shows a command not found error. -bash: restview: command not found I've ...
1
vote
1answer
319 views

Can't install Python Modules

I'm running OSX 10.8.5 with python 2.7.10. When I run the following pip install pyodbc I get the following error message. Error Message: Command "/Library/Frameworks/Python.framework/Versions/2....
2
votes
2answers
3k views

keeping python 3 up to date on a mac

I want Python 3 (and I do not want to mess with OS X provided python). According to: https://docs.python.org/3/using/mac.html I can get Python 3 and live long and prosper, BUT it is not clear what ...
3
votes
2answers
2k views

No package 'libffi' found in Homebrew Virtual Environment

I'm using a homebrew installation of python and getting an error using pip within a virtualenvwrapper environment: No package 'libffi' found Package libffi was not found in the pkg-config search path....
1
vote
0answers
64 views

can't commit network settings via command line

I'm writing a Python script that changes network settings with commands like networksetup -setv4off 'PANTECH UML295' and networksetup -setdhcp 'PANTECH UML295'. When I enter these in Terminal, I enter ...
0
votes
1answer
29 views

How to minimise the terminal automatically when it is running a shell script?

I have a shell script which runs a Python Program. I created the shell script so that the users of my program may simply double click it to run my program. When the shell script is executed; the ...
3
votes
2answers
1k views

Scapy on Mavericks via Homebrew “AttributeError: 'module' object has no attribute 'intf'”

I tried to install Scapy on OS X via Homebrew which seemed to work fine. After installation there were some Python modules missing which I installed via Homebrew. Now when I start Scapy I get the ...
0
votes
0answers
55 views

Vim Caught deadly signal SEGV

More frequent than I would like my vim crashes with the terminal prompting Vim: Caught deadly signal SEGV. I use vim with the pyflakes plugin to edit python scripts. The vim is the standard ...
1
vote
3answers
160 views

Problem: How to clear all remnants of random.py, random.pyc, and random.pyo that isn't part of Python's standard library?

I wrote an import random code, and unfortunately saved it as the module's name I was trying to call. eg. random.py I believe, but am not sure, that I created the random.py file twice and thus I ...
0
votes
0answers
808 views

Open ipynb files by double clicking: Have custom items

I have been able to work out a method of opening IPython Notebook files (.ipynb) by double clicking on them using a combination of a python script and Automator.app. The python script is #!/usr/...
0
votes
1answer
632 views

Warnings when installing pip

I just installed pip and got a few warning messages. Should I be concerned? Is there a way to check that pip was installed properly? Here's what I did: [mchenja@mycomp ~]$ sudo easy_install pip ...
0
votes
0answers
136 views

os.Popen command is not working

I'm writing a python script that is suppose to change default display settings for all users. I run the script as sudo because it needs to change every display. This line is suppose to change the ...
1
vote
0answers
185 views

Problem with Livestreamer after updating Python to 3.4

After upgrading to Python 3.4 i get this message when trying to use livestreamer: /usr/local/bin/livestreamer: line 3: __requires__: command not found /usr/local/bin/livestreamer: line 4: import: ...
5
votes
2answers
2k views

Do I need to reinstall OS X after accidentally removing Python?

I managed to delete my python in usr/bin by foolishly doing sudo rm /usr/bin/python and now it seems like I need to reinstall my OS. First off is this necessary? And secondly is there an easy way to ...
1
vote
0answers
274 views

Changing color of text in terminal for program output

This might be answered already but I could not figure out a good way to phrase it to look for an answer so I hope you'll bear with me. I want to change the color of the text output on Terminal if it ...
1
vote
0answers
283 views

“brew install python” without Xcode in Snow Leopard

I've been able to get brew to install many packages on Snow Leopard using just the gcc library without installing all of Xcode. I had installed Python as well as PosgreSQL from the gui installer and ...
1
vote
0answers
115 views

Terminal appears to ignore autoproxyurl setting

I can't get easy_install to install anything as it complains it gets a connection refused.: Searching for BeautifulSoup Reading https://pypi.python.org/simple/BeautifulSoup/ Download error on https:...
6
votes
4answers
9k views

Python Virtualenv is broken since upgrading to OS X Mountain Lion

Since upgrading to Mountain Lion, when running the command "virtualenv env", I get: New python executable in env/bin/python Installing setuptools......... Complete output from command /Users/...
1
vote
1answer
224 views

Mac OS X Terminal - While True Do - Can you stop automatically under desired conditions?

Currently I am using a following command: while true; do python [file]; sleep X; done I was wondering if I can stop the loop if the result prints a word that I'm looking for. Plus is it possible to ...