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
17 views

Why does Python keep popping up and occupying my CPU?

I occasionally get Python popping up and occupies all my CPU I have no clue why this is happening, because I almost never run Python on my laptop.
0
votes
0answers
9 views

Pyglet not working on MacBook

I have installed Pyglet on my mac for python 3.8 but it isn't working . By that I mean when I type pyglet.font.add_file('DIN Next W01 Light.ttf') to add that font into my file it shows an error No ...
2
votes
2answers
39 views

What causes excessive CPU use by taskgated, notifyd, and launchd processes?

I've looked around a lot to try to find the answer to this but have thus far been unsuccessful. I am programming in Python, and I have code that takes a long time to run (hours to months depending on ...
0
votes
0answers
3 views

Remote mySql with a dynamic IP address [migrated]

I've got a python script on my PC that needs to run every day as my host provider does not support the python modules im using. The python script collects data and then feeds it to the mySql database ...
0
votes
1answer
12 views

which certificate/identifiers/profilers should be used for python script to be distributed as a pyinstaller build/bundle outside the app store?

My program works as follows In a while loop, it checks for the active window change - AppKit library used from AppKit import NSWorkspace active_window = (NSWorkspace.sharedWorkspace()....
0
votes
1answer
18 views

Python launcher Icon every time a script runs

I've had a MacBook given to me from work for over a year now and recently I got a new mac and every time I launch a python script the python launcher icon appears in the mac dock. However, in the old ...
-1
votes
2answers
43 views

Updating python on macOS

Its usually not recommended to update a system package (such as python) on macOS. However, I have been asked to upgrade to test something. So now the question is - how hard it is to update python on (...
0
votes
0answers
6 views

Unexpected behavior with php in Catalina + Apache2 — classic “phpinfo.php” script produces a “Save” dialogue box, but no error msgs

I am using the default installations of Apache2 and php7 that came with Catalina on a Mac AIR. I am trying to run the classic phpinfo.php script: <?php phpinfo.php ?> My https.conf file ...
0
votes
0answers
8 views

why python 2.7 doesnt pick pyqt4 installed using homebrew

I needed to fix the application before I migrate it to pyqt5, so I installed pyqt4 using brew: brew install cartr/qt4/pyqt now when I tried launching pyqt4 app I still get this error: Traceback (most ...
2
votes
2answers
104 views

How to code-sign my python script / package packaged for mac using pyinstaller without using xcode?

I have written a python script and bundled it using the PyInstaller. The executable file inside the dist folder works fine on my Mac. But not on someone else's Mac even if they've set "App Store ...
0
votes
0answers
14 views

How to make script run on system start/user login via terminal [duplicate]

I have Mac OS PC, let's name it PC1, and I have Linux PC (PC2), on Mac os PC I have python script(reverse shell), I need to make it run on system start or user login(no matter) threw terminal, I have ...
0
votes
0answers
12 views

Command + W has stopped working for python app

I'm working on a matplotlib Python application to draw graphs (MacOS Catalina 10.15.5). I was able to close the window using Command + W but recently that doesn't seem to work. The shortcut works with ...
1
vote
0answers
30 views

Failed to import cxutils module into Python

I had been using Crossover for a while on High Sierra (10.13.6) without any problem but recently, I needed it again and tried to install it again but encountered a very annoying error. Looked for a ...
0
votes
0answers
12 views

Failing to connect Python to MySQL — no luck with brew install mysql-connector-c

I think I must have made some mess with brew install/uninstall of MySQL, but I don't know how to get out of this state: I'm trying to run MySQL stuff on Python 3.7 (High Sierra 10.13). However: ...
2
votes
1answer
48 views

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): ...
0
votes
1answer
35 views

My Mac Book Pro switch between charge and not charge when running a long program

When I am running a very long program (e.g. A long python script) and when I plug in the charger, my laptop will switch between charging and not charging very frequently. However, if I stop that ...
0
votes
0answers
49 views

Python3 script runs fine in Terminal but not as a crontab job

Using an iMac, Catalina. Recently changed ISP and need to know when feed was swapped over. New to Python scripting. I managed to get this running in Terminal, But not crontab. Crontab reads:- @reboot ...
0
votes
0answers
360 views

How to Install NLTK for Python3 on Mac [duplicate]

I am trying to use NLTK and am able to do so using python2.7, but I am unable to use it with python3 (i.e. when I type import nltk, I get the following error message: ModuleNotFoundError: No module ...
0
votes
1answer
35 views

What's the `darwin` in Mac?

In my Mac I execute the code: import sys print(sys.platform) then get darwin, why it is not OSX. I don't know where to look for documentation on python sys module. What's the darwin ?
0
votes
1answer
28 views

Facing problem to test Energy Consumption by a factorial function with Python module “pyRAPL”

I would like to calculate energy consumption. That's why I have used the following program, unfortunately it gave errors. MWE: #need python3.7 to run this from math import * import time # time ...
0
votes
1answer
24 views

How do I get Apache to use the default pyenv Python version instead of the system one?

I am using plain Apache 2.4 on Mac OS Catalina. I installed pyenv to manage python versions. The default Python is 3.8.0 Now I try to have Python scripts running in Apache. I created a subdomain ...
1
vote
1answer
40 views

How do I install python pyRAPL module on MacOS?

How do I install python pyRAPL module on MacOS high sierra 10.13.6? The following errors are coming up whenever I try to install. How do I solve it?
1
vote
1answer
76 views

How to view real time dynamically updated information on thermals and fan speed through the terminal?

Is there any way to view real time fan speed and thermal information (CPU, GPU) through the terminal, such as by installing an application with homebrew (i.e. $ brew install ...) or python (i.e. $ pip ...
0
votes
0answers
15 views

Automator service to transform outlook reply body

I'm trying to create a macOS service (in python, preferably) that would allow me to change the rich-text body of an outlook message I'm editing. If I set the service script to receive rich text, it ...
1
vote
1answer
32 views

Stop installing python for each package by brew

I have installed python on Mac by Anaconda. Here is the path : /Users/USERNAME/anaconda3/bin/python /usr/bin/python But when I want to install any package that need python, it installs it separately....
1
vote
1answer
54 views

Pip cannot install packages after upgrading to Catalina

I haven't used pipenv since upgrading, but today I needed to work on an old project and I'm getting problems with pipenv and other python utilities. I did a xcode-select --install and brew update &...
0
votes
0answers
11 views

Can some file types be excluded from Time Machine backups? [duplicate]

Using a Python script which compares lists of paths and hashes, I am validating a Time Machine backup. By this script, I have found that some folders and file extensions have been skipped. In ...
0
votes
1answer
25 views

Cannot type 'c' in Terminal - Restore Terminal to default settings

I am new to terminal, learning how to code in Python. I was trying to turn the autocomplete tab function on, using the code found in the link below. https://timleland.com/how-to-enable-autocomplete-...
2
votes
1answer
793 views

The system version of Tk is deprecated [duplicate]

I installed python3 and tcl-tk with homebrew on my iMac. However, when I want to launch my program using the terminal, this message is displayed: DEPRECATION WARNING: The system version of Tk is ...
1
vote
1answer
72 views

Maxima and Jupyter - will Homebrew work?

I'd like to give Maxima a try in a Jupyter notebook on my Mac. Is the Homebrew version of Maxima up to the task? I did try following the instructions at https://github.com/robert-dodier/maxima-...
0
votes
0answers
8 views

Match Siri parameter against array strings in scriptable?

If we write a Siri shortcut in javascript or python (e.g using scriptable or pythonista), and accept a parameter in the Siri request, is there a way to provide an array of terms against which Siri can ...
0
votes
0answers
21 views

Does a developer have to write a whole iOS app to make a Siri Shortcut?

I have some things I'd like to be able to get Siri to do, just on my own iPhone. I could write those things in plain python (possibly in some other language). Can Siri Shortcuts run these (python/...
0
votes
1answer
195 views

Youtube-dl is returning errors when grabbing from Mixcloud

In short - I thought my earlier Python 3 enquiry would solve my problem with Youtube-dl but it didn't. I am working through a reddit enquiry I put in a couple of weeks ago and am now a bit stumped: ...
2
votes
3answers
261 views

What are ways of installing Python 3?

In short I'm looking to install Python 3 (have a programme that on one of it's recent updates no longer ran with 2.7) I have Homebrew installed (but am not sure how I did it e.g. by Sudo I think?) and ...
2
votes
1answer
523 views

Python quit working and now I get “Illegal instruction: 4” message

I have an old iMac running High Sierra and I use the Anaconda distribution of python 3.7. I've been using Anaconda for over 2 years and it has worked fine. I have a test code I've run over 100 times ...
1
vote
1answer
40 views

Terminal automatically opens conda [duplicate]

Every time I open my terminal I get (base) Users-MacBook-Air:~ Uriel$ instead of Users-MacBook-Air:~ Uriel$ without the (base) line which means that the environment of conda is open. In order to ...
0
votes
1answer
141 views

Use Automator to run Python script when files added to folder

I have a folder, Books, where I add all of the .pdf files that need to be uploaded to a Kindle. I have a Python script that does that, but instead of manually running it, I want to check whenever ...
1
vote
0answers
902 views

Cannot delete /usr/bin/python3 on Catalina

I just upgraded my macbook from Mojave to Catalina, and after that, I upgraded brew as well. The result is, now I have two python3 binaries: qxu@xqiang-mac-1:~$ which python3 /usr/local/bin/python3 ...
1
vote
1answer
55 views

Firewall setup for Python.app incoming connection

I am running a Python programme on my MacBook Pro (Catalina), but everytime it prompts the following information However, in the pane of Security & Privacy preferences, I have set it, How can I ...
1
vote
1answer
1k views

OpenSSL installation in macOS Mojave 10.14.6?

I am getting odd errors that OpenSSL package has some problems. Earlier I insntalled PyCharm IDE that is built on pyenv environment, it may have somehow broken my OpenSSL. I have tried to install ...
0
votes
1answer
104 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....
2
votes
1answer
2k 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
359 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 ...
2
votes
2answers
239 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
33 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
258 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
75 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....
3
votes
1answer
464 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
38 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
26 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
2 3 4 5
9