Unable To Initialize Device Prn Python


*

I had this same difficulty when I accidentally typed "print regime.py" rather of "python regime.py". The error message originates from the Windows command-line regime named print. Those that said refounding the command also prompt more than likely committed the same typo without noticing, and corrected it in their brand-new command prompt.

You watching: Unable to initialize device prn python


*

I know this is an old question, however I experienced this issue in VS Code after installing the latest variation of Python and also the Python extension.

To solve it, I simply needed to include the Python installation course to my PATH setting variable.

On Windows 10, go to Settings and also search for Environment Click on Edit environment variables for your account Select Path and also click the Edit switch If the route to your Python.exe is not listed, click the New switch Enter the route to your Python.exe application and click the OK switch The course for me was %LocalAppData%ProgramsPythonPython37-32 Restart VS Code and attempt to run your python script aget
*

*


*

*

Try transforming name of the program; that worked for me. Don"t forget: use fresh cmd once you begin executing.


I had actually the exact same trouble by accidentally sfinishing the word "print" to the command also line from my programming which DOS interprets as the DOS command also to print to the printer.


I encountered this in VS Code. I had actually run some lines of code (making use of Shift + Enter), which starts a Python interpreter in a terminal, and then I referred to as quit() at the terminal, to exit Python. If you try to run some more lines of code, it does not start one more Python interpreter, it just runs those lines in the terminal, which of course doesn"t work and causes error messperiods prefer the one in the question.

Two easy remedies are either to start a new Python interpreter in the terminal (by entering python), or killing the active terminal circumstances (the dustbin icon), before running more lines of code.

See more: Monty Python Tee Shirts - 19 Very Silly Monty Python T


To solve this, add python.exe to device varible in your windowsOn Windows 10, go to Setups and search for EnvironmentClick on Edit atmosphere variables for your accountSelect Path and also click the Edit buttonIf the path to your Python.exe is not provided, click the New buttonEnter the path to your Python.exe application and also click the OK buttonand also rebegin the application


I am utilizing VS code and I just noticed this issue this day. Google a small and also I comment out all the print function still not working. I leave the vs code and also launch it aobtain and it functions simply perfectly.


Please attempt to enter python in terminal and then execute the same command .In terminal kind "Python" then run the command print("Hi"). It will certainly work-related.


Thanks for contributing a solution to Stack Overflow!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up through referrals or personal suffer.

To learn more, see our tips on writing good answers.


Message Your Answer Discard

By clicking “Blog post Your Answer”, you agree to our regards to company, privacy plan and also cookie plan


Not the answer you're looking for? Browse other concerns tagged python-3.x or ask your very own question.


I am just starting to learn python, and also once I attempt to usage print it tells me Unable to initialize device PRN
site style / logo design © 2021 Stack Exadjust Inc; user contributions licensed under cc by-sa. rev2021.8.16.39990


Your privacy

By clicking “Accept all cookies”, you agree Stack Exreadjust deserve to save cookies on your device and also discshed information in accordance via our Cookie Policy.