Thankyou so much it helped me a lot. I was just got frustrated after trying so many times but after watching your video it made my concept totally clear. Thanks a lot for this video 😊.
@@wrttech422 So, I got it to work and fixed the "Something Went Wrong No Module Named 'Request' " problem by doing pip3 install requests. but for some reason it says the same message but instead of Requests it says "Colorama" at the end.
I keep getting *python: can't open file 'test.py': [Errno 2] No such file or directory* idk why. i tried both *print('hello world')* and *print("hello world")* but I keep getting that message. I feel like there's something I'm missing...
Make sure youre changing the directory(cd) to the location of you python script. Also, make sure youre using the exact name of the script in the command prompt.
Question: how to run your python scripts without specifying the exact location of the file? instead of C:\Users\Python> python sample.py. i want it to be: immediately sample.py or sample.exe
Hey please answer this comment The script which I have will process the input from an excel sheet (.xlsx) so how do I pass the excel sheet as input in the cmd, I tried ....(going to the path where the script and excel files are there) and I run this command.... (py script.py excel.xlsx).... But that doesn't work. Please tell me how to execute it in a proper way if you know
you could take in the arguments as a list, and then use it (name of excel sheet) to process your excel sheet. use import sys, and sys.argv[1] will = excel.xlsx. Look at this website for further information. www.stackvidhya.com/run-python-file-in-terminal/#:~:text=You%20can%20use%20the%20command,while%20running%20the%20python%20script.
I just made a video on command line arguments using python. See if this helps answer your question. Link to the video is below. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZQ9JO0e9468.html
What does your code look like? Are you typing in the commands properly? Windows/Mac/Linux machine? Make sure youre not running python test.py from inside the interpreter, but instead from inside the command prompt.
I have some bug that I don't know how to fix. C:\Users\User\Desktop>python hell.py File "C:\Users\User\Desktop\hell.py", line 3 print(x**2) ^ IndentationError: expected an indented block after 'for' statement on line 2
because that code is wrong. It should be: print ('hell world') for x in range(1,11): print(x**2) 1. F in for should not be capitalized 2. for int(1,11) should actually be: for x in range(1,11): 3. print(x**2) should be indented after the for loop
SyntaxError: invaild syntax >>> py test.py File "", line 1 py test.py ^ I have tried 5 different videos and reinstalled twice, and wrote 3 scripts. any help would be greatly appreciated.
if your python program "test" is located in a folder on your desktop called code...youll type: cd Desktop/code python test.py youre typing py test.py are you using mac or windows?
your environmental variables could also be incorrectly set "To check that Environment variable is set correctly: Open cmd.exe (command prompt/terminal) Type Python and press return (a) If it outputs the version of python then the environment variables are set correctly. (b) If it outputs "no such program or file name" then your environment variable are not set correctly." if you type python inside the command prompt and the version is displayed, youre probably trying to run the file inside the python interpreter.