Questions tagged [python]

Python is a programming language that is included in the standard macOS installation. If you have any programming questions about Python, ask them on Stack Overflow.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

For making an assistive device, does iOS 13 enable control of a cursor using code?

Curious if it's possible to control a cursor on an iPad, for example to allow someone who can't touch the screen to be able to generate movement commands some other way, and have those commands sent ...
0
votes
3answers
39 views

Stand alone Python Launcher download? [closed]

Is there some way you can just download the python launcher instead of doing a full install of python? I already have python 3 installed through anaconda. I'm looking for a really easy way people ...
0
votes
1answer
31 views

Unable to open serial port using simply python script on macOS Catalina: [Errno 16] Resource is busy

On a brand new MacBook16 running Catalina (10.15.1) I am getting the following error trying to connect to an FTDI FT232R USB UART device. Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:07:15) [...
1
vote
1answer
31 views

How to make “python” command in terminal open python3 instead of python2.7 which comes with mac?

Mac comes with Python2.7. For a project, I need to use Python3.7.5. I installed it. However, if I just type python in terminal, the 2.7 interpreter starts. How do I make it so that when I type ...
1
vote
0answers
25 views

Anaconda and its libraries in macOS Catalina

Apple is constantly introducing changes to how it handles a range of issues. Some are, I assume, security-related. This affects programming environments such as Python (Anaconda) and R and others. ...
2
votes
0answers
24 views

Python continuously crashing after Catalina update

During my regular development tasks, there is no problem with python. I can activate my virtual environments, interpreter and keep on development with no error whatsoever. However, randomly MacOS ...
1
vote
0answers
271 views

Using tkinter with Catalina, how to avoid deprecation warning?

I want to use the tkinter GUI library with python3 and Catalina 10.15.1, but I get a deprecation warning. % python3 Python 3.7.4 (default, Oct 26 2019, 09:13:24) >>> import tkinter >>&...
5
votes
2answers
835 views

Is /usr/bin/python3 provided with macOS Catalina?

Is /usr/bin/python3 provided with macOS Catalina?
1
vote
1answer
30 views

How do I install MySQLdb on my MacBook or is there a way I can skip install and use sqlalchemy without it?

I have macOS Sierra and XAMPP installed (with mariadb as database). However, on my local MacBook I am running this Python code to create table: from sqlalchemy import create_engine def create_db(): ...
1
vote
0answers
16 views

Place for Anaconda on macOS

There are several posts that are discussing relevant aspects of Anaconda installation on macOS here and here, and elsewhere. My question is more of a principled kind: what would be an appropriate ...
2
votes
1answer
79 views

Automator action to run python script on series of files fails in Catalina

Major edit I've just discovered that the Automator workflow I'm having problems with works perfectly if I run it by pressing 'play' in the Automator window, and it seemingly only fails when I save it ...
2
votes
1answer
38 views

How can I fix things when LaTex issues a package minted error for “Pygments” or pigmentize?

I am trying to install the "Pygments" package to Python via terminal on my Mac so that I can utilize the "minted" package in Latex. I have downloaded the package via the terminal by using the ...
0
votes
0answers
16 views

pip install mysql-python throws error

I am on MacOS Mojave 10.14.6 (18G103). When I try to install mysql-python it throws an error : $ pip install --upgrade setuptools Requirement already up-to-date: setuptools in /usr/local/lib/python2....
3
votes
1answer
46 views

Delete key inserts a space on Python interpreter after upgrading to Catalina

I recently upgraded to Catalina on my Macbook Pro (2015) and have this bizarre issue: If I open up the Python interpreter in Terminal, I am able to type normally except for when I press the delete ...
0
votes
0answers
26 views

newly installed python3 using brew failing when I try to run pipenv install

I am very upset and this is really wasting my time, when I run pipenv i get the below error, Termination Reason: DYLD, [0x1] Library missing Application Specific Information: dyld: launch, ...
2
votes
0answers
102 views

pip3 abort signal on startup

I've just upgraded to macOS Catalina, I've used brew install dpkg, and homebrew decided it was time to run brew cleanup. After running it, I've not been able to run pip3 anymore. Tried running brew ...
-1
votes
3answers
106 views

Why do I only have pip3 but no pip?

I installed python3 from www.python.org(not thru brew). I found that I did not have pip then, only pip3. As here said https://pip.pypa.io/en/stable/installing/ pip is already installed if you are ...
2
votes
3answers
401 views

Levelator working with Catalina?

One big app that we use constantly and is arguably the best (free & simple) tool to automatically adjust audio levels for podcasts and any kind of recording is Levelator. There's simply no ...
0
votes
1answer
172 views

Re-install Python on macOS

I uninstalled Python on my Mac by moving all python-related files in my Mac (including system files) to the trash and emptying the trash. Now, I can't get Python 3 to work at all (despite reinstalling ...
0
votes
0answers
119 views

Problem with spglib library python library installation on Catalina beta

I am running the Catalina Mac OS X beta (19A558d). I have installed a python virtual environment for python 3.7 and am trying to install the package "pymatgen". The installation is having trouble ...
1
vote
0answers
20 views

Mount folder as another folder in iOS (darwin17), like mount -o bind or bindfs?

I have to communicate folders from one app to another in a Jailbroken device. Unfortunately my app cannot deal with symlinks, and I have too many files to do hard links on all of them. The only way ...
1
vote
1answer
156 views

Python Launcher shows nothing on the terminal

I installed python 3 in Mac OS. When I first time ran a python program using Python Launcher, it asked for something like printing access to terminal. I declined it. Now when I run any python program, ...
1
vote
0answers
151 views

Difference Between Safari Web Content and Safari Web Content (Cached)

I created a program in Python to kill the Safari Web Content (Cached) processes. However, when I ran that program, I failed to take into account that Apple uses the same file for both version of ...
0
votes
1answer
169 views

How to property uninstall Python 3.7?

I'm trying to build a package but would like to uninstall Python 3.7 from my machine first. The build appears to think /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python exists on ...
1
vote
2answers
436 views

How to execute python script by terminal?

I wanted to learn Python, I installed some software. I created a little execution files and none of them will execute. So I've checked my terminal and type basic things like Is, cd etc. None of them ...
0
votes
1answer
26 views

What do these marks indicate exactly on these tray icons when I run Python from a terminal?

I ran an Anaconda Python installation from iTerm using python -i myscript.py. It made a plot using Matplotlib. After I closed the plot, the two icons remain. Each has a dot under it, and a little ...
4
votes
0answers
201 views

Using Raspberry Pi as a home hub for Apple HomKit setup

I'm trying to make my home a bit smarter using HomeKit without actually buying HomeKit accessories. Now I'm using python and the pyhap libary and it is working so far. I can control my Raspberry Pi ...
0
votes
0answers
17 views

python mac os app pyqt4 dependency import error

getting this error while trying to launch python app dependent on pyqt4 Traceback (most recent call last): File "/Applications/Gallery.app/Contents/Resources/scripts/gallery", line 16, in <...
0
votes
1answer
62 views

Access to ioreg using Python?

Is there a way to access the values ioreg utility accesses via Python? What i'm looking is to add monitoring of the battery status of my Magic Mouse. I know I can get it by using ioreg -c ...
1
vote
1answer
28 views

Python interactive mode not registering changes made to file on disk

I am running Python 2.7 in interactive mode in Terminal. If I make changes to the Python source or data file while the same is open in Python prompt, it doesn't appear to see the change, and exhibits ...
1
vote
0answers
50 views

How to make AppleScript ignore escape characters in string to make a Note

I have a python script that takes a user's input and inserts it into the name and body parameter of the make new note apple script. The problem is that any escape or special characters get interpreted ...
1
vote
0answers
59 views

Getting OCRmyPDF to work with PDFMiner

I'm trying to get OCRmyPDF to work on my Mac. I installed it successfully by running: brew install ocrmypdf But when I tried using it by running: ocrmypdf --redo-ocr input.pdf output.pdf I get ...
1
vote
2answers
62 views

Which macOS tools require Python 2 (rather than Python 3)? [closed]

macOS comes with Python 2 installed, which is presumably because some tools the OS uses are not compatible with Python 3, as suggested by the answers to this Quora question. Which tools/programs pre-...
1
vote
1answer
62 views

Running Java / Jython process in the background

I am trying to run a Jython script in the background. This is what the script looks like, a_jython_script.py for i in range(10000): print i When I try to run it in the background, it is ...
0
votes
0answers
107 views

Tcl-Tk Homebrew install with X11 support

I am trying to modify the tcl-tk Homebrew formula to have tk installed with x11 instead of the default aqua. However I haven't been able to do it so far. Can anyone help? This is the tcl-tk.rb: ...
0
votes
0answers
39 views

Intercept Macos notifications

I would like to create an App (Python or whatever language) that would be able to "intercept" other apps notifications before they appear and sometimes block them. Do you known if it is possible ? I ...
11
votes
2answers
11k views

When updating to macOS Catalina will the default Python installation get removed from my system?

Apple will stop shipping scripting languages like Python with macOS starting with Catalina. When I eventually update to macOS Catalina, will the Python (2.7.X), which currently ships with macOS get ...
4
votes
2answers
265 views

How to get rid of Python Launcher icon every time a script runs?

Using Sublime Text 2 or Atom (maybe other editors too), when running a simple plotting script in Python, the Python Launcher icon (the rocket) pops up every time I run the code. The icons add up in ...
0
votes
0answers
55 views

Using automator with python script that requires user input during Spotify API authentication process

I have a script that gets name, artist, and spotify ID of the currently playing song, and add the track to a pre-defined spotify playlist. To make the process of running the script a bit easier, I ...
0
votes
1answer
192 views

Why isn't a binary not being found in my PATH?

I've got a Python project which uses a virtual environment. In my project folder, there is a bin/ folder which contains all the executables needed by the project. To use these, you run source bin/...
1
vote
0answers
108 views

Missing Messages from chat.db

Hi so I can't currently create a minimum reproducible example but I am missing texts that I know I sent and appear in the search on the iMessage app but aren't in chat.db My python code below import ...
1
vote
1answer
903 views

Unable to install python mysqlclient - OSError: mysql_config not found

I installed mysql through XAMPP. When I try pip install mysqlclient I get this error MBP-of-admin:django_project aanto$ pip install mysqlclient Collecting mysqlclient Using cached https://files....
1
vote
1answer
449 views

How can I determine the sound volume from within a python script?

I need to see when the sound volume on my Mac hits a certain point, in Python (and preferably without the need of any permissions). Any pointers appreciated.
1
vote
0answers
156 views

Failing to install the package “Pygments” with brew

I'm try to use the minted package in latex to display code in latex document. I get an error message "you must have pygmentize installed" to use this package. So I tried to install the package ...
6
votes
3answers
8k views

How to add permanent environment variable in zsh

I have been scouring the internet, and cannot seem to find a solution to permanently adding an environment variable, specifically when my OS is macOS Mojave (10.14). It seems there are a lot of ...
4
votes
0answers
459 views

Pip Installed Tools: “command not found” | Homebrew Installed Python Tools Work Fine

I installed Python 3 with Homebrew and a tool I was installing through Homebrew auto-installed Python 2.x. So, I have both and pip (etc) is installed for both, unlike the macOS default Python. ...
3
votes
1answer
3k views

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 ...
1
vote
2answers
188 views

How to set the python environment for LaunchDaemons

I have installed Python 3 via Homebrew, on my Mojave system, and have it symlinked to /usr/local/bin/python. I have a LaunchDaemon plist as follows: <?xml version="1.0" encoding="UTF-8"?> <!...
4
votes
0answers
33 views

Is there a script/cmd that I can create/run that will allow me to install .dmg? [duplicate]

I have been working on a "Mac Rollout Project". After I run the Macs through the Apple setup, I have a list of .DMG / Applications that I have to install. There is no particular order that the .DMG / ...
1
vote
1answer
34 views

Path of an application (here Python) is not accessible from the Finder

I cannot see in the Finder the path "/Library/Frameworks/Python.framework" (there is no folder "Frameworks" inside "Library") although this path is the output of the error message when trying to run a ...