简体   繁体   English

需要将PyCharm中的shell更新为zsh

[英]Need to update shell in PyCharm to zsh

Started taking the 'Programming for everyone' course on Coursera to learn python.开始参加 Coursera 上的“面向所有人的编程”课程来学习 python。 Ive downloaded 2 text editors.我下载了 2 个文本编辑器。 Atom and Pycharm.原子和 Pycharm。 When I open the terminal both say, "The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh ."当我打开终端时,都说:“默认的交互式 shell 现在是 zsh。要更新您的帐户以使用 zsh,请运行chsh -s /bin/zsh 。”

Please understand I'm totally new.请理解我是全新的。 This is the first time I've ever used a text editor or terminal so don't know where to run this or how to straighten this out.这是我第一次使用文本编辑器或终端,所以不知道在哪里运行或如何解决这个问题。 Im using a 2015 MacBook Pro running 10.15.7 Image is screenshot of editor and terminal in pycahrm im in.我使用的是运行 10.15.7 的 2015 MacBook Pro图片是 pycahrm 中的编辑器和终端的屏幕截图。

Yeah, it sucks.是的,这很糟糕。 I had the same problem with Pycharm, but this solution worked for me.我对 Pycharm 有同样的问题,但这个解决方案对我有用。

1- Change zsh to bash 1-将 zsh 更改为 bash

$ /bin/bash

2 - Get the commands back like (cd, ls, clear...) 2 - 获取命令,如 (cd, ls, clear...)

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

3 - Get the profile back 3 - 取回个人资料

. /etc/profile

After that your porfile will look like this "username:" instead of this "%n@%m %1~ %#"之后,您的 porfile 将看起来像这个“用户名:”而不是这个“%n@%m %1~ %#”

One more thing, if you using mac, open your terminal and check preference .还有一件事,如果您使用 mac,请打开终端并检查偏好 In the preferences go to General -> Shells open with -> if it is Default Login shell which means you are using zsh , you should change to Command (complete path): and add /bin/bash in the space below so that your default change to bash.在偏好 go 到General -> Shells open with -> 如果是Default Login shell这意味着您正在使用zsh ,您应该更改为Command (complete path):并在下面的空间中添加/bin/bash以便您的默认更改为 bash。

I hope it was useful for you, and for the people looking for answers.我希望它对您以及寻找答案的人有用。 Cause, I wasted an hour looking for solution that JetBrain Pycharm and Apple couldn't provide.因为,我浪费了一个小时寻找 JetBrain Pycharm 和 Apple 无法提供的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM