Python Forum
How do I get pygame module to work in Spyder? (Mac)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I get pygame module to work in Spyder? (Mac)
#13
OK so after using "which python" and "python -c "import sys; print(sys.executable)"" the path is shown as:

/opt/miniconda3/bin/python

My current interpreter is set to the above but alas I get a new error message now:

Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.9/site‑packages/spyder_kernels/console/__main__.py", line 24, in
start.main()
File "/opt/miniconda3/lib/python3.9/site‑packages/spyder_kernels/console/start.py", line 328, in main
kernel.initialize()
File "/opt/miniconda3/lib/python3.9/site‑packages/traitlets/config/application.py", line 113, in inner
return method(app, *args, **kwargs)
File "/opt/miniconda3/lib/python3.9/site‑packages/ipykernel/kernelapp.py", line 669, in initialize
self.write_connection_file()
File "/opt/miniconda3/lib/python3.9/site‑packages/ipykernel/kernelapp.py", line 256, in write_connection_file
write_connection_file(
File "/opt/miniconda3/lib/python3.9/site‑packages/jupyter_client/connect.py", line 164, in write_connection_file
with secure_write(fname) as f:
File "/opt/miniconda3/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/opt/miniconda3/lib/python3.9/site‑packages/jupyter_core/paths.py", line 898, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o0600), mode, encoding=encoding) as f:
PermissionError: [Errno 13] Permission denied: '/Users/Tony'
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/miniconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/miniconda3/lib/python3.9/site‑packages/spyder_kernels/console/__main__.py", line 24, in
start.main()
File "/opt/miniconda3/lib/python3.9/site‑packages/spyder_kernels/console/start.py", line 328, in main
kernel.initialize()
File "/opt/miniconda3/lib/python3.9/site‑packages/traitlets/config/application.py", line 113, in inner
return method(app, *args, **kwargs)
File "/opt/miniconda3/lib/python3.9/site‑packages/ipykernel/kernelapp.py", line 669, in initialize
self.write_connection_file()
File "/opt/miniconda3/lib/python3.9/site‑packages/ipykernel/kernelapp.py", line 256, in write_connection_file
write_connection_file(
File "/opt/miniconda3/lib/python3.9/site‑packages/jupyter_client/connect.py", line 164, in write_connection_file
with secure_write(fname) as f:
File "/opt/miniconda3/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/opt/miniconda3/lib/python3.9/site‑packages/jupyter_core/paths.py", line 898, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o0600), mode, encoding=encoding) as f:
PermissionError: [Errno 13] Permission denied: '/Users/Tony'

I'm not sure how to fix this since my current account is admin.

Thanks for helping me out so far snippsat. I really appreciate it. It's been 2 days since I first stumbled across the pygame issue. Hoping I can resolve it over the weekend and continue learning code afterwards.
Reply


Messages In This Thread
RE: How do I get pygame module to work in Spyder? (Mac) - by FirstBornAlbratross - Dec-17-2022, 03:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  keyboard module doesn't work in the microsoft version terminal of python. username 1 2,995 Feb-25-2021, 05:19 PM
Last Post: Larz60+
  pygame music doesn't work CompleteNewb 1 4,909 Jan-30-2021, 09:25 AM
Last Post: Tyrel
  Cannot make 'pandas' module to work... ellie145 2 4,343 Jan-05-2021, 09:38 PM
Last Post: ellie145
  My Python Console doesn´t work ModuleNotFoundError: No module named 'tokenize' RuanKishibe 1 3,298 Aug-06-2020, 10:07 PM
Last Post: deanhystad
  ModuleNotFoundError: No module named 'pygame' Cath 3 14,570 Oct-18-2019, 05:59 PM
Last Post: metulburr
  Pycharm Cannot Find Pygame Module Myang123 2 6,149 Aug-07-2019, 01:26 AM
Last Post: Myang123
  Spyder: Module Not Found jmair 2 20,424 Sep-25-2018, 05:14 PM
Last Post: jmair
  Attribute of module shelve doesn't work Ponomarenko Pavlo 1 5,178 Jul-12-2017, 06:08 PM
Last Post: buran
  Pygame*import pygame ImportError: No module named pygame CASPERHANISCH 1 9,863 Jun-05-2017, 09:50 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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