Python Forum
Potential Permission error on Mac OSX Catalina
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Potential Permission error on Mac OSX Catalina
#1
Problem:
  • Cannot import modules - including some included ones in some cases, and so cannot continue coding and debugging on my local machine.
Expected Results:
  • Installed and previously running modules should be importable and able to run as they did on the last run before the issue.

When did it start:
  • After denying permissions accidentally to a folder on Mac

Attempts to fix:
  • Allowing Python and anything remotely Python related that I can find in Security dialogues to have access to folders and in some cases "Full Disk Access" (To test)
  • Reinstalling modules or checking modules with PIP - Things are fine by pip's view.
  • I have found no solutions online. Any search for permissions (my assumed reason for the issue), brings up how to get permissions in what is running ("How do I get python to have permissions to send network data..."), rather than for Python itself.
  • Removing Python and any evidence I can find in the Library folders and other system folders and reinstalling Python from a new, updated download.

My only other alternative, as is the case in many python issues... is to reinstall the OS and start from scratch


Extended description of what I believe caused the problem and it's supporting evidence (even though I don't know exactly what happened):

I usually use Python 3 IDLE to code and run before putting things on the remote server when I'm coding at home.

I accidentally double-clicked the [program].py file in Finder, when navigating through my documents folder causing the program to try running "in Python" (launcher, IDLE... whatever the default is for that action).

Further, I accidentally clicked Deny on the permissions request to access the file system for whatever the program was that was opening.

Since that time, I am unable to import ANY modules, including some native or included ones. "Since that time" means literally my next action since that accidental click happened was to run my code again. There were no code changes between the problem and the next debug/run module action. I had IDLE open, and running my next debug and test was met with:

Error:
Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> import pgpy ModuleNotFoundError: No module named 'pgpy'
Additionally, even simple tasks in IDLE for import pgpy or import requests returns similar to the above.


Is there any other solution other than reinstalling the OS? What should I try next?

It won't be that much of a problem, but it is inconvenient. I have only a few files for travel that are backed up, but I want to have a greater knowledge of Python's installation than that.

Thank you for your time
Reply
#2
I have similar problems installing programs with pip after upgrading to macOS Ventura.

Here's the method that worked for me on macOS Ventura:
  • In the top left corner of the screen, click the Apple icon.
  • Navigate to System Settings...
  • Select Privacy and Security from the left-hand menu.
  • In the right-hand panel, scroll down to Developer Tools and click on it.
  • Toggle the switch next to Terminal on and off.
buran write Apr-24-2025, 05:04 AM:
Spam link removed
Reply
#3
It sounds like a frustrating situation you're dealing with. Before considering an OS reinstall, you might want to try a few more steps. First, ensure that you have restored permissions to the folder where your Python files are located. You can do this by right-clicking the folder, selecting "Get Info," and adjusting the permissions at the bottom of the window to ensure your user has "Read & Write" access.
buran write Apr-24-2025, 05:02 AM:
Spam link removed
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  The INSERT permission was denied on the object Steven5055 3 2,999 Jun-12-2024, 08:13 AM
Last Post: GregoryConley
  Delete file with read-only permission, but write permission to parent folder cubei 6 25,553 Jun-01-2024, 07:22 AM
Last Post: Eleanorreo
  KivyMD android app - problem with permission polak7gt 0 919 Jan-18-2024, 01:27 PM
Last Post: polak7gt
  Is it possible to use the full potential of scalene in Pycharm? arnoldpredator 4 2,059 Nov-18-2023, 01:46 PM
Last Post: arnoldpredator
  logging: change log file permission with RotatingFileHandler erg 0 2,528 Aug-09-2023, 01:24 PM
Last Post: erg
  Potentiostat/Galvanostat potential issue pepe523869 10 4,680 Nov-05-2022, 07:08 PM
Last Post: pepe523869
  Permission issue when using scapy jao 3 16,852 Feb-05-2022, 06:14 PM
Last Post: snippsat
  Error no 13: Permission denied in python shantanu97 1 8,815 Mar-31-2021, 02:15 PM
Last Post: snippsat
  How a Mac OS software can restart itself with admin permission in Python 3.7? Formationgrowthhacking 0 2,403 Sep-03-2020, 05:29 PM
Last Post: Formationgrowthhacking
  Error 13 permission tpolim008 2 4,677 Apr-09-2020, 06:22 PM
Last Post: tpolim008

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020