pythonw.exe or python.exe?
If you don't want a terminal window to pop up when you run your program, use pythonw.exe
;
Otherwise, use python.exe
Regarding the syntax error: print
is now a function in 3.x
So use instead:
print("a")
Execute python executable and script inlucing full path
Please check my code. It is working well in my side.
from subprocess import call
call([r"C:\Python38\python.exe", r"E:\python\hello.py"])
As i think, the problem is that you use pythonw.exe.
if you use pythonw.exe, you can see any log in terminal.
Pythonw is useful for running script with GUI.
pythonw.exe completely dysfunctional on windows
According to http://www.velocityreviews.com/forums/t752828-pythonw-exe.html, which I quickly verified myself:
pythonw.exe is the same as python.exe but it doesn't open a console
window, and launches python in the background. This allows you to
easily run background programs or GUI programs in a nicer way (without
a dummy console window popping up).
This is precisely what you see. Don't use pythonw.exe if you want an interactive interpreter.
pythonw.exe entry point not found when running spyder in an environment
I'm having the same issue, and I've tested all new installations via pip that will encounter this issue. It seems the problem is related to creating the virtual environment on Windows OS.
As Ten Kho posted, the only error message is a pop-out window that says entry point error.
I fixed the problem by install scoop (guide can be found here https://scoop.sh/), and use scoop to reinstall python on windows. This fixed the pythoncom38.dll issue for me.
Related Topics
Does Python Do Variable Interpolation Similar to "String #{Var}" in Ruby
How to Open (Read-Write) or Create a File with Truncation Allowed
Request Uac Elevation from Within a Python Script
Instance Variables VS. Class Variables in Python
How to Make a Discontinuous Axis in Matplotlib
Differencebetween Size and Count in Pandas
Detect and Exclude Outliers in a Pandas Dataframe
Clang Error: Unknown Argument: '-Mno-Fused-Madd' (Python Package Installation Failure)
Which Is the Preferred Way to Concatenate a String in Python
Differencebetween "Is None" and "== None"
How to Redirect the Stdout into Some Sort of String Buffer
How to Run Script with Elevated Privilege on Windows
Select Iframe Using Python + Selenium
Match a Whole Word in a String Using Dynamic Regex
Writing a Pandas Dataframe to CSV File