Error when trying to add packages to remote Project Interpreter

Answered

Hi Community,

I have root access via SSH to a Siemens IOT2040 device running Yocto and would like to use the remote deploy options provided by Pycharm.

I got the transfer of my script files to work but am now stuck when trying to add packages.

The message Sudo password dialog cancelled. is displayed.

Yocto does not have sudo by default, is there a way to avoid using this command in Pycharm?

Thanks,

Ben

4 comments

To install packages globally, you need root privileges so sudo is required when installing packages. If you don't want to use sudo then you can install the Python packages to the user's local Python packages but that means no other user will be able to utilize them (unless you allow that but that is a different conversation) or use a virtual environment on the remote host.

--------------------

I'm having the same issue after I accidentally cancelled the dialogue but I haven't been able to get it back again.

The user account that PyCharm is using to connect to the remote host does NOT require a password to run sudo commands which is why I cancelled the dialogue in the first place. I've been a paying customer for many years and JetBrains need to do a hell of a better job at this if they want to keep my business. 

 

0

Hi Jamie,

As a workaround, I recall, some users used the shell script as an interpreter https://stackoverflow.com/questions/14299509/debugging-in-pycharm-with-sudo-privileges

>I'm having the same issue after I accidentally cancelled the dialogue but I haven't been able to get it back again.

Do you mean that you are not able to see the dialogue window Sudo password dialog cancelled after closing it? Do you have any errors now? If yes, please attach a screenshot showing it.

 

0

Sergey,
That had absolutely nothing to do with this and is a bad practice. This is about managing packages, not executing scripts, and about PyCharm's obsession with using sudo with a password even though sudo does not require a password but PyCharm needs a password.

Every time I try to install a package for a remote interpreter, PyCharm opens a dialogue that says "sudo dialogue cancelled" and that's it.

I tried deleting and recreating the interpreter but nothing. I'm not about to delete and recreate the project, that's absurd. I gave up on PyChstm using s remote interpreter.

0

Please sign in to leave a comment.