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

macos laptop WakeUp with mouse on USB programmatically [closed]

MacOs, How with a laptop, use the mouse or the keyboard (connected in USB) To WakeUp? On a laptop the WakeUp with MacOs is always achieved by pressing the PowerButton key, the USB ports are made ...
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
18 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
11 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
34 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
32 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
42 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
15 views

how can i learn my os internals and how it networks?

i need to update/upgrade my computer skills with we courses and resources. my strength is in networking, system level coding/scripting, analysing systems and administering them. i'd like to start by ...
0
votes
0answers
199 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
32 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
23 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
19 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
32 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
61 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
29 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
51 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
425 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
0answers
32 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
7 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
20 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
147 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
259 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
383 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
34 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
86 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
569 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
40 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
91 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
263 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
205 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
191 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
68 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
1answer
394 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
37 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
vote
1answer
555 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
78 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
613 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
17 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
2answers
856 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
143 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
44 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. ...
4
votes
1answer
371 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 ...
5
votes
0answers
6k 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 >>&...

1
2 3 4 5
9