-
Notifications
You must be signed in to change notification settings - Fork 27
Description
In a recent update (using 2022.3.2 pro), they seem to have changed the way they build the cython extensions, or perms for the installation have changed, not sure which.
When trying to compile the extensions, a dialogue pops up 'Compile Cython Extensions Error' with contents:
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 "/usr/lib/python3.10/shutil.py", line 417, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.10/shutil.py", line 256, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: '/opt/pycharm-professional/plugins/python/helpers/pydev/_pydevd_frame_eval/pydevd_frame_evaluator.c'
I think it's really bad form for pycharm to write to the install path rather than a user folder, and other bugs relate to their approach doing this (eg. assuming C:\program files\ is user writable on windows) but just wanted your feedback on good work around.
Running: sudo chmod -R a+w /opt/pycharm-professional/plugins/python/helpers/pydev allows it to do its thing but that's obviously really bad from a security point of view.
Not sure what could be done from a packaging point of view, short of creating a pycharm or jetbrains group during to add users to that would have group write access to the required folder? Mindful that that would create more work for you is all.
I'm keen to hear what you think an appropriate solution is as it may start affecting other jetbrains apps.