The IDE encounters errors when parsing libraries while using remote SSH

已回答

In PyCharm version 2024.3, I use SSH to connect to a remote server and utilize the interpreter in the remote virtual environment. Due to the use of the remote interpreter, the code can run normally. However, errors occur when the local IDE parses libraries. Even the print function will have a red underline. I hope you can reply as soon as possible. Thank you!

 

0

Hi 1345854929, have you tried to invalidate caches (File | Invalidate Caches | Invalidate and restart)? Does it make any difference?

Would you please share logs from Help | Collect Logs and Diagnostic Data for in-depth analysis? Please upload it to https://uploads.services.jetbrains.com and let me know the upload ID.
 

1

Thank you for your reply, Mikhail Tarabrikov. I've already tried invalidating caches (File | Invalidate Caches | Invalidate and restart), but this method didn't work. I have uploaded the logs. Upload id: 2024_12_09_R1dJjP6ApGPUPo8TjWDAgj (file: pycharm-logs-20241209-20100917578404217121336014.zip). 

 

I've found a possible reason that may lead to the above phenomenon. The local Interpreter path is empty(Settings | Project | Python Interpreter | Show All | Show Interpreter Paths)

1

1345854929, there appear to be some errors while trying to configure the interpreter on the remote host:

2024-12-09 19:57:30,546 [  89547]   WARN - #c.j.p.r.t.s.t.SshEnvironment - Process `mktemp -d ${TMPDIR:-/tmp}/XXXXXXXXXX` exited with code 1.
Available stderr:
mktemp: 无法通过模板"/tmp/XXXXXXXXXX" 创建目录: 设备上没有空间

I am wondering if the user has sufficient permissions on the remote host? Is there sufficient free space to create a temp directory?

 

1

Thank you very much, Mikhail Tarabrikov. After I specified the temp path and cleared some space, the remote Python interpreter was able to import normally.

1

1345854929, thank you for letting us know! I am glad it helped.

0

请先登录再写评论。