I attempt to run a python program and the following pops up in command prompt:
\"Unable to initialize device PRN\"
I should also mention that the program runs fi
I know this is an old question, but I experienced this issue in VS Code after installing the latest version of Python and the Python extension.
To fix it, I just needed to add the Python installation path to my PATH
environment variable.
- On Windows 10, go to Settings and search for Environment
- Click on Edit environment variables for your account
- Select Path and click the Edit button
- If the path to your Python.exe is not listed, click the New button
- Enter the path to your Python.exe application and click the OK button
- The path for me was
%LocalAppData%\Programs\Python\Python37-32\
- Restart VS Code and try to run your python script again