Search code examples
pythonide

Debugger in Pycharm doesn't work properly


I'm using Pycharm and want to debug my project but when I go and hit the debug key I get the following message

Python Debugger Extension Available Cython extension speeds up Python debugging

When I click on install I get the following error message

Copile Cython Extension Error:

Non-zero exit code (1): Traceback (most recent call last): File "/opt/pycharm-professional/plugins/python/helpers/pydev/setup_cython.py", line 242, in   main() File "/opt/pycharm-professional/plugins/python/helpers/pydev/setup_cython.py", line 233, in main with FrameEvalModuleBuildContext(): File "/opt/pycharm-professional/plugins/python/helpers/pydev/setup_cython.py", line 187, in __enter__ shutil.copy(compatible_c, self._c_file) File "/home/lz/.pyenv/versions/3.8.16/lib/python3.8/shutil.py", line 418, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/lz/.pyenv/versions/3.8.16/lib/python3.8/shutil.py", line 264, in copyfile with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: '/opt/pycharm-professional/plugins/python/helpers/pydev/_pydevd_frame_eval/pydevd_frame_evaluator.c' 

(Side notes: I'm using arch and also utilize pyenv for python version management)

I tried to install cython both via Arch's package manager and via pip in my project but to no success


Solution

  • Run

    sudo chown <user> <path_to_dir>/_pydevd_frame_eval/

    Open up pycharm again as a normal user, click on install and everything should work as intended