Questions tagged [python]

General usage of any python tool and running scripts and Apple specific questions are on topic here. Detailed languag-specific questions about programming (where it won’t matter if python runs on any os) belong on Stack Overflow.

Python is a programming language. If you have any programming questions about Python, ask them on Stack Overflow, or try one of the 2 chat rooms:

  • Chat at the dedicated IRC channel #python on Freenode for all things Python. Look at Python IRC listing for a specific alternative channel, if interested.

  • Chat about Python with other Stack Overflow users in the Python chat room.

It is included in the standard macOS installation at /usr/bin/python. This python.org page shows how to start.

The installation comes with many libraries that allow interaction with other applications using Apple events, in the same manner as AppleScript or calls to native libraries, standard internet protocols like HTTP, SMTP etc.

622 questions
62
votes
3 answers

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 happens when I want to upgrade using the next DMG. …
user1256923
  • 3,610
6
votes
1 answer

Installing Python 3.0 on my Mac

I'm using built-in Python 2.6.1, however, I need to run Python 3.0 from time to time. Is it OK to install Python 3.0 on my Mac? Is there anything that I need to be cautious? How about the easy_install? If I have 2.6 and 3.0 on my Mac, where to the…
prosseek
  • 5,694
6
votes
1 answer

What does Python Launcher do?

When download python from https://www.python.org/ and install it, I saw 2 apps installed, it is easy to see the purpose of IDLE but I am confused with the purpose of Python Launcher. What does Python Launcher do ? When do I need to it?
4
votes
1 answer

Uninstall virtualenv, Mac

When trying to run a command: pip uninstall virtualenv it raises an error: Exception: Traceback (most recent call last): File…
Max
  • 173
4
votes
3 answers

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 it an app... I know I can put as first line of…
user90775
3
votes
3 answers

Using python 3 when the default is python 2.7

I installed python3 with homebrew and can access it with python3 command in terminal. I'm installing a command line app that needs python3. When I try to use it it says: Python 3.3+ required When I do python --version it reports python 2.7. How…
Harry
  • 2,210
3
votes
3 answers

where are python packages installed on Lion?

I'm pretty sure before Lion, I was using /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages Although this might have been from a manual install of 2.7 on 10.6 OS X. Anyway, any idea where standard location is…
2
votes
1 answer

Python Weirdness on Terminal Open

When I open Terminal I see the following: Last login: Wed Feb 8 18:30:05 on ttys029 Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/handlers.py", line 75, in emit …
chernevik
  • 173
2
votes
1 answer

Python with Catalina : No module named 'OpenGL'

I am running the examples provided by the PyQtGraph python graphic module, on a MacOS Catalina. They all work fine for me, except those in 3D. I have a message : Traceback (most recent call last): File…
2
votes
1 answer

How to ensure separate pathways of each instance of Python

I recently upgraded to High Sierra on my Macbook Air. I installed the latest upgrade of Python: 2.7.14 from python.org. There is documentation and a Read Me file for 2.7.14 in the Applications folder. The Read Me file for the user-installed python…
Bergi
  • 23
2
votes
3 answers

Why is python's "easy_install" installing into the wrong directory?

I've installed python 2.7 with the dmg-installer of the official python page. After typing which python in terminal, I get this: /Library/Frameworks/Python.framework/Versions/2.7/bin/python But when I want to install a package with easy_install, for…
2
votes
1 answer

Error when installing matplotlib

I tried to install matplotlib on OS X Lion with the pip install command, but I get the following error: error: command 'clang' failed with exit status 1 Does anyone have a solution?
PAC
  • 121
1
vote
1 answer

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 --upgrade to upgrade): virtualenv in…
ustroetz
  • 291
  • 2
  • 7
  • 15
1
vote
4 answers

How to confirm MacOS "system" Python version

MacBook Pro outfitted with Ventura 13.2.1 It is my understanding that "system" python: macOS Catalina or later is deployed with Python3.x removing system python is fatal / requires OS to be reinstalled How does one return the version of the system…
gatorback
  • 3,031
  • 8
  • 40
  • 57
1
vote
0 answers

esptool.py fail to install on mac

I'm trying to use esptool.py to flash ESP32. Since I use Arduino IDE I assume it is installed and work correctly. But since I need to work using command line I encounter problems regarding python2.7 which send an end of life messages, and python3.8,…
guyd
  • 263
1
2 3