Unable to initialize device PRN on Pycharm

Question:

New to PyCharm, was wondering what is going wrong, I have the newest Pycharm update installed, can’t run terminal commands on PyCharm for some reason. Every time I try, I get the "Unable to initialize device PRN" response from PyCharm.

For context, I do have Python installed already, Here is the screenshot of the Error, confused on what I would do.

I have tried looking on YouTube and StackOverflow, can’t find anything that relates specifically to this, should I change my directory? Any help would be appreciated.

Solved:

For anyone having the same issue, you are probably in the Powershell console,

First type in

"Python" in the terminal like this!, then run any command in the terminal as you wish!

Asked By: AaTekle

||

Answers:

It’s a strange mistake. May be, "device PRN" means printer. And your IDE tries to redirect output to a printer.

This error may occur if your system’s printer configuration is not set up correctly, or if there is a problem with PyCharm’s configuration.

Here are some steps you can try to resolve this issue:

  1. Try restarting PyCharm and your computer.

  2. Check your system’s printer configuration to ensure that it is set up correctly. If you are not sure how to do this, you can search online for instructions specific to your operating system.

  3. Check PyCharm’s settings to ensure that the correct interpreter and terminal settings are selected. To do this, go to File -> Settings -> Project: [name of your project] > Project Interpreter. Make sure that the correct interpreter is selected and that the "Use Terminal" option is checked.

  4. If the above steps do not work, try resetting PyCharm’s settings to their default values. To do this, go to File -> Manage IDE Settings -> Restore Default Settings.

If none of the above steps work, you may want to try reinstalling PyCharm to see if that resolves the issue.

Answered By: Dmitrii Malygin

As @jprebys allready mentioned in the comments, you’re in the powershell-console, not Python.

answer might help you to understand.

Answered By: kaliiiiiiiii
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.