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
-1
votes
0answers
11 views

Genrating random numbers from a list, where some of these numbers can be moved from the list as the program progresses [closed]

I'm writing a program where I have a "group" of 6 people trying to guess a number between 1 and 6. If the first person gets it right then 1 is added to their score, but if not the second person takes ...
0
votes
1answer
30 views

Installing Python 3.5.6.1: python contains a recursive dependency on itself: [duplicate]

I am trying to install Python 3.5.6.1 with: $ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb $ brew switch python 3.6....
1
vote
1answer
246 views

How to install Python on macOS Catalina using homebrew?

I'm trying to install Python 3 in macOS Catalina (10.15.3 (19D76)) using homebrew but it is giving the below error: dmanna-a01:operations dmanna$ brew install python3 ==> Downloading https://...
1
vote
1answer
24 views

Why is Python version set with PyEnv global not picked up a default one?

I have installed pyenv and used it to install Python 3.8.1 I had Python 3.7.6 installed manually before. I have set 3.8.1 as global and, as this version is now markered with *, it was taken into ...
1
vote
2answers
80 views

How to (and should I) put a path to user-installed python ahead of system-installed python?

I have a separate installation of Python 3.*, but the first python path in my $PATH variable is the path to system-installed Python. Is this how it should be? I have added the path to user-installed ...
0
votes
1answer
32 views

How to update Python which download from official website?

I'm mac user, and I downloaded Python from the offcial website. What if I want to update Python, what should I do? I also installed the Java JDK from offcial website, both of them are .pkg, can ...
1
vote
1answer
49 views

Why would a python3 script not find a module when run in Automator?

I am trying to automatically run a python script using automator. This script python3 ~/Desktop/python/gmaps.py works fine in terminal but not when I try to run it through Automator , I get a "module ...
1
vote
0answers
27 views

MacOS Mojave 10.14.6: can't install gevent 1.1.2

I'm trying to install gevent==1.1.2 (I know it's an old version, but it's required from Odoo to run properly) on Mojave 10.14.6, but it keeps failing at the setup. I'm using Python3.6.5 and pip 19.3.1....
2
votes
0answers
127 views

Can't run python script from Automator on Catalina “Operation not permitted”

I have a service in Automator that I pass a folder and it runs on every file in the folder. It uses a python script to read the album field from an mp3's id3 tags and write it to the Finder comment ...
0
votes
0answers
34 views

Custom Shortcut on Mac Doesn't Play Sound

I've been playing around with custom keyboard shortcuts on my Mac, and I've constructed one using Automator that is supposed to pick and play a sound from a small folder. This was achieved using an ...
0
votes
0answers
24 views

View refreshing problem for a Python application

I'm trying to install the Wikidpad app on macOS High Sierra following these simple official instructions. After installing everything needed, as indicated, I move from the terminal to the folder where ...
1
vote
1answer
141 views

getting `pip` to use `python3` instead of macOS-supplied python2?

I don't really know much about python or pip so this may be an easy question but I’ve looked around and don’t really see an easy to understand solution, and the deadline is coming up soon, so it seems ...
1
vote
1answer
47 views

How do I let preinstalled python 2.7 access pip installed modules?

I installed python3 using brew, all the modules installed thru pip are located at /usr/local/lib/python3.7/site-packages How do I let the macOS preinstalled python 2.7 access those modules (b/c I ...
1
vote
0answers
303 views

(When Launching Python) CoreText note: Client requested name “.SFNSMono-Regular”, it will get Times-Roman rather than the intended font

When launching idle (Python 2.7) or idle3 (Python 3.7.5) from the Terminal I get several lines similar to the one below with different fonts as FONTNAME (".SFNSMono-Regular", ".SF NS Mono", ".sf ns ...
0
votes
1answer
16 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
1answer
234 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
60 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
39 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. ...
3
votes
1answer
201 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 ...
4
votes
0answers
2k 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 >>&...
9
votes
2answers
2k views

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

Is /usr/bin/python3 provided with macOS Catalina?
1
vote
1answer
88 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
18 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 ...
3
votes
1answer
173 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
50 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
1answer
39 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
96 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
1answer
57 views

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

When I run pipenv i get the below error, Termination Reason: DYLD, [0x1] Library missing Application Specific Information: dyld: launch, loading dependent libraries Dyld Error Message: Library ...
2
votes
1answer
149 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
407 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
735 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
3answers
479 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
167 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
34 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
419 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
345 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
372 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
594 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
27 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
235 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
94 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
29 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
81 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
77 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
68 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
82 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
157 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
43 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 ...
12
votes
2answers
16k 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 ...

1 2 3 4 5 9