Working directory error

前端 未结 10 833
无人共我
无人共我 2021-01-30 22:04

I am working with PyCharm 4.04. Since I installed it, every time I open it, as default directory I get this:

C:\\Users\\Laura\\AppData\\Local\\Temp\\main.

10条回答
  •  爱一瞬间的悲伤
    2021-01-30 22:30

    @user1068430 has the answer in the comments to the question:

    When you open a project open the directory not a specific python file. Instead of ~/Documents/myProject/main.py open ~/Documents/myProject

    If you "open" the .py file then you'll have to set the working directory (File > Settings > Build, Execution, Deployment > Console > Python Console > Working Directory) every time. If you "open" the directory containing the .py file, then PyCharm will open and all of your .py files will be available in the left window. Select one of them and you're good to go.

提交回复
热议问题