Occasionally, we need one of our Python files to import code from another Python file. In such cases, you may encounter an error that restricts you from performing the import:
PermissionError: Operation Not Permitted
The steps required to fix this problem depend on your operating system.
Navigate to System Preferences.
Select Security and Privacy.
Select Files and Folders.
Find Spyder in your list of applications and give it access to
your Desktop
, Downloads
, and Documents
folders.
Make sure that your cs111
folder in within one of these folders.
Open Settings.
Navigate to Privacy.
Scroll down to File system.
Click Allow apps to access your file system.
Last updated on September 8, 2024.