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.
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
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 ...
if the above mentioned solutions are not working, you can restart a new project. file > New project... then, create a new project.
▼
next to your main to run (look to the left from green right-pointing triangle)Edit configurations
.▼ Python
select the proper configuration name.Configuration
panel.Script
and Working directory
.pycharm