"Failed to prepare environment", after upgrading to Pycharm professional 2023.1.4
Hi,
I get a "failed to prepare environment" error when trying to run remote pyhton via ssh. The shell on my remote machine is tcsh and I cannot change that.
I tried all kind of things that I found online, but they did not help. Maybe the following output from the "introspect" phase of setting up a new remote interpreter shows what is going on:
Starting introspection for Python...
> echo ${SHELL}
/bin/csh
Command finished with exit code 0
> /usr/bin/which python3
Unknown option: `--login'
Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ].
Command finished with exit code 1
Failed to execute command
> echo ${HOME}
Unknown option: `--login'
Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ].
Command finished with exit code 1
Failed to execute command
Introspection completed with error. Getting environment failed with exit value 1
Is there some kind of workaround? Because right now I can't work from remote...
Many thanks,
Oren
请先登录再写评论。
Hi,
The mentioned issue with csh shell on the remote host is described here PY-61089. It's marked as solved in the latest EAP Version - 2023.2
Please download it and try again.
Nope. Same problem...
Oren
Oren Shani
Please provide additional details. Is there a new error message on the latest EAP?
Enable the extended logs for the IDE commands, reproduce the issue, and collect log files afterward.
1.To increase the logging level, please add the following line to the Help > Diagnostic Tools > Debug Log Settings section:
#com.intellij.execution.configurations.GeneralCommandLine
2. Reproduce the behavior.
3. Then upload the zipped log file from the IDE UI at Help | Collect Logs and Diagnostic Data to https://uploads.jetbrains.com/ and share it's uploadID
Hi Miguel
Upload id is 2023_07_18_T2s3D8ijL7HFJBpdu6at2X
Thanks,
Oren
Checking it further PyCharm tries to run
mktemp -d ${TMPDIR:-/tmp}/XXXXXXXXXX
but it doesn't work on csh. We have the following request addressing this PY-58348 - Vote for the issue using the thumbs-up button on the right of the issue summaryUnfortunately the only workaround, for now, is to change to a different shell.