how to fix command prompt unable to initialize device prn in PC

Liu Pak Hei Jayden 0 Reputation points
2026-08-28T02:00:04.2066667+00:00

User's image

Whether I write something valid, the terminal cannot initialize device PRN. I am thinking whether I'm clicking anything wrong. What can I do?

Windows for home | Windows 11 | Performance and system failures
0 comments No comments

Answer accepted by question author
Hendrix-V 18,055 Reputation points Microsoft External Staff Moderator
2026-08-28T06:36:19.11+00:00

Hi Liu Pak Hei Jayden,

Based on what is shown, Command Prompt itself appears to be working normally. The message occurs because print() is a programming-language function (for example, in Python), but Command Prompt does not interpret it that way.

To verify this:

  1. Display text in Command Prompt: echo abc
  2. Perform a calculation: set /a 1+1

If you're following a Python tutorial, start Python first: python

  • Then run: print(1+1) and print("abc")

If echo abc and set /a 1+1 work correctly, there is likely no issue with Command Prompt, and the solution is to use the appropriate command or run the commands within the Python interpreter instead.

Let me know if you need further assistance, feel free to ask me by clicking "Add Comment" or "Add Answer" if you cannot add comment so your response will be visible. Thanks for your effort.


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.