Problem with Run button in python 3.x on VS code - python-3.x

I have problems running python files in VS code, like run button is not working sometimes and also it's showing 2 options to run file. as shown in the screenshot. Python 3.x on VS code on WIN 10 Machine

Related

Visual Code gives error that it cannot find Python on Mac Pro

I'm running a Mac Pro 2021 model version 12.6. For some reason, my vscode will not run Python anymore when I tried using a program. I switched over to the cloud-based version for a while and now switched back to the application. It says that it could not find Python in my files. I believe both VSCode and my Mac are updated up to date. I installed python 3.11.0 for Mac, but no progress. I also tried running the update shell.command and the certificate commands as a part of the download in the vscode terminal, but it did not help. I also reinstalled the Python
v2022.16.1 Vscode extension and restarted the program. I still get the same error.
Explained above.
Have you tried Shift + Command + P type "Python: Select interpreter" yet?
Usually, all installed Python interpreters show up here, and you can also enter a path to a Python interpreter on your system.

My .py executable or setup file works in my laptop but not in another system

I have created a Python code that uses both selenium and openpyxl, the code works fine locally. I Converted it into a .exe and setup files using pyinstaller and it also runs well, but when I transfer it into another computer running on Windows 10 without Python installed, it shows a Runtime error.

cmd not showing from spyder script

I have a python script that I run using spyder. It execute other scripts with os.system("...").
My problem is that the cmd windows are not poping (the code is executed, but I can't monitor it, eg see print() or errors).
it was working before I updated spyder recently.
I tried unchecking the "Hide command line output windows generated by the subprocess module" in Tools > Preferences > IPython console > Advanced settings > Windows adjustments
but nothing changed. How can I changed that?
Thanks

report lab libraries not working when python 3.5 script is run from OSX Automator

I have many python 3.5 scripts to handle my business affairs. All of these run perfect from IDLE and from the bash shell. When I create OSX Automator apps they all run well except the included reportlab functions do not work. I have also attempted to create the app with py2app but this fails to find the qt4 and reportlab libraries and fails. Any suggestions?

How to ensure Python script runs by double clicking on Windows OS

I have two Windows 7 machines. On one machine I can run python scripts by double clicking on the .py file, however on the other machine the script does not execute, the command prompt will flash quickly and the script does not execute. I can execute scripts on both machines using the command line. I have the same version of python installed on both machines.
How do I ensure that a python script can be executed by double clicking the script on Windows 7?
Step 1. Check if your .py files are associated with "python launcher" (Not just "python"). You can check that by right clicking the .py file and see:
In my case, I have two machines of Windows 10. The one with Python 3.6 installed by choosing "Install Now" works perfectly. The another one which having the same version of python installed in a customized location has problems. It seems nothing to do with the environment path setting, as I could run python in the console mode correctly. So at the end, I was forced to uninstall the python, (then removing all the related paths manually if needed), and install it again with default setting "Install Now".

Resources