Can't run Python console: FileNotFoundError: [WinError 3] The system cannot find the path specified
已回答
Hi,
i have imported a project of pycharm but when i run the console i have this error:
FileNotFoundError: [WinError 3] The system cannot find the path specified
The path of my project is changed but what have I to change for running the console?

请先登录再写评论。
Hi,
Thank you for contacting PyCharm support.
Does it happen when you run your code or just open Python console?
Please check
Settings | Build, Execution, Deployment | Console | Python Consoleand also your Run/Debug configuration. Is everything is correct?Looking forward to your reply.
Kind regards,
Sergey
https://jetbrains.com
The Drive to Develop
Hi Sergey,
thank you for your support.
I can run my python code but i can't run my console if i click on "Console" button at the bottom.
I attach you the screenshot of my console setting.
I have Pycharm 64 bit version and Python 3.6 interpreter (32 bit)
Thank you for the update.
It seams you are using another interpreter in your Python Console. Could you please set it to `Project Default...`? (example below)
If doesn't help, please attach your logs folder zipped (Help | Show Log in...).
Kind regards,
Sergey
https://www.jetbrains.com
The Drive to Develop
Hi Sergey,
thank you for your support.
I tried to change the interpreter (on image) but it doesn't help.
I attached you the zip file that you requested and i attached you a text file that contains the console errors.
https://www.dropbox.com/s/xw2wk81xhgs40b7/log.zip?dl=0
kind regards
Thanks for the files.
Please attach a screenshot with your Project Interpreter window (Settings/Preferences | Project | Project Interpreter) and of your Interpreter Paths window (https://www.jetbrains.com/help/pycharm/2018.3/installing-uninstalling-and-reloading-interpreter-paths.html)
Kind regards,
Sergey
https://www.jetbrains.com
The Drive to Develop
Sure,
Sorry, but by `Interpreter Paths` I meant different window. Please use it as an instruction on how to open that window https://www.jetbrains.com/help/pycharm/2018.3/installing-uninstalling-and-reloading-interpreter-paths.html.
Its something like this:
Oh, yes sorry Sergey.
Yes i didn't understand what you meant.
These are my paths (on screenshot)
Anyway, have I to reload the Path interpreter following your guide that you linked ? https://www.jetbrains.com/help/pycharm/2018.3/installing-uninstalling-and-reloading-interpreter-paths.html.
It seams that you have renamed the project at some moment from `AggStrat` to `AggStratFlask` which broke the virtual environment inside it.
Please try the following:
1. Remove the interpreter in PyCharm (on the last window of which you have provided a screenshot).
2. Remove `venv` folder inside of your project.
3. Re-create virtual environment.
No no, they are different projects.
I use both AggStrat and AggStratFlask.
Anyway if I recreate virtual environment , how can i re-obtain libraries that i installed?
You could do `pip freeze > requirements.txt` in your current environment, then `pip install -r requirements.txt`.
Thus you will save all the packages and their versions to requirements.txt and then install it to new environment.
Yes, i thought about this solution but when i run this command
pip freeze > requirements.txt
the file is empty. Is something wrong?
(I can use only the terminal and not python console because the problem is that)
Is it the correct file?
You should see it in PyCharm in your project after execution.
Yes i see it but it is blank. I executed the command from the terminal (inside Pycharm).
Hi, what does pip freeze without a redirection returns in the terminal?
Hi Pavel,
it didn't return a list (that's why the file requirements.txt is blank).
Have i manually install all libraries??? :(
>Have i manually install all libraries?
With either "pip install ..." in the terminal or with PyCharms' UI in Settings | Project ... | Project Interpreter. At this point, this is the only solution I can think of, not sure what is wrong with this venv, but it seems to be corrupted.
Hi Pavel,
i wrote on a paper the list of libraries and i've re-created the environment.
Now it works.
Thanks.