Modify the working directory in pycharm settings
Path:
file | settings | build, execution, deployment | console | Python console
Fill in the python installation directory in the working directory and restart the python console
Modify the working directory in pycharm settings
Path:
file | settings | build, execution, deployment | console | Python console
Fill in the python installation directory in the working directory and restart the python console