Modify the PS in front of the terminal run in PyCharm to the current environment

Recently, I used the Terminal in Pycharm to pip install some packages. I found that the display in front of the Terminal was PS, and then I entered the installation instructions and reported an error. "Python does not recognize the 'pip' item as the name of a cmdlet, function, script file, or executable program."

 

Solution:
You only need to modify some terminal environments in the pycharm settings. The specific steps are as follows:

1. Open settings in pycharm;

2. Find the Terminal option;

3. Change the location of the shell path to cmd.exe;

4. Click OK;

5. Restart pycharm.

 

After restarting, I found that entering Terminal showed that it was in the virtual environment by default, which successfully solved the problem. 

 

Guess you like

Origin blog.csdn.net/weixin_43734080/article/details/132768442