Working directory error

前端 未结 10 800
无人共我
无人共我 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:46

    i had the same issue, the error comes up when i want to upgrade my packages and when i run my project "this FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\youruser\AppData\Local\Temp\gen_py\3.7\__init__.py'" i found that the Temp file in C:\Users\youruser\AppData\Local was corrupt and it was fixed by deleting the "Temp" file, once deleted it will automatically create a new one with "gen_py" in it

    0 讨论(0)
  • 2021-01-30 22:52

    I also got this error, and it got resolved by setting the default working directory. Follow the below path, and set the Working Directory to the folder where your code resides.

    File > Settings > Build, Execution, Deployment > Console > Python Console > Working Directory ...

    0 讨论(0)
  • 2021-01-30 22:52

    if the above mentioned solutions are not working, you can restart a new project. file > New project... then, create a new project.

    0 讨论(0)
  • 2021-01-30 22:55
    • In the upper right corner click on small next to your main to run (look to the left from green right-pointing triangle)
    • Select Edit configurations.
    • In ▼ Python select the proper configuration name.
    • Look at the Configuration panel.
    • Fix items Script and Working directory.

    pycharm

    0 讨论(0)
提交回复
热议问题