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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  KivyMD android app - problem with permission polak7gt 0 297 Jan-18-2024, 01:27 PM
Last Post: polak7gt
  Is it possible to use the full potential of scalene in Pycharm? arnoldpredator 4 635 Nov-18-2023, 01:46 PM
Last Post: arnoldpredator
  logging: change log file permission with RotatingFileHandler erg 0 1,050 Aug-09-2023, 01:24 PM
Last Post: erg
  The INSERT permission was denied on the object Steven5055 2 1,491 Feb-25-2023, 11:37 PM
Last Post: Steven5055
  Potentiostat/Galvanostat potential issue pepe523869 10 2,473 Nov-05-2022, 07:08 PM
Last Post: pepe523869
  Permission issue when using scapy jao 3 9,855 Feb-05-2022, 06:14 PM
Last Post: snippsat
  Error no 13: Permission denied in python shantanu97 1 6,191 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 1,789 Sep-03-2020, 05:29 PM
Last Post: Formationgrowthhacking
  Error 13 permission tpolim008 2 3,489 Apr-09-2020, 06:22 PM
Last Post: tpolim008
  Fixing "PermissionError: [Errno 13] Permission denied" puredata 17 72,674 Mar-09-2020, 03:20 PM
Last Post: syssy

Forum Jump:

User Panel Messages

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