python' is not recognized as an internal or external command
You need to add that folder to your Windows Path:
https://docs.python.org/2/using/windows.html Taken from this question.
Python command not working in command prompt
It finally worked!!!
I needed to do things to get it to work
- Add C:\Python27\ to the end of the PATH system variable
- Add C:\Python27\ to the end of the PYTHONPATH system variable
I had to add these to both for it to work.
If I added any subdirectories, it did not work for some reason.
Thank you all for your responses.
Not recognized as an internal or external command, operable program or batch file
The executable, if it was created, is not in your path. You can try:
python -m hikvision-recover <serial number> <Date information>
How to make Python not recognized as an internal or external command an exception
It appears you are using Python to run a Python file using the operating system shell.
You can run the file by importing it and (if needed) instantiating it.
try:
# import the python file
import currency.py
# instantiate the class/function if required
except ImportError:
ctypes.windll.user32.MessageBoxW(0, u"Error", u"Error", 0)
Nevertheless you can avoid using the try/catch scenario by seeing if the file exists, if not, display your error message:
if os.path.isfile(file_path):
os.system('currency.py')
else:
ctypes.windll.user32.MessageBoxW(0, u"Error", u"Error", 0)
Related Topics
Python Subprocess Get Children's Output to File and Terminal
Comprehensive Beginner's Virtualenv Tutorial
Python Analog of PHP's Natsort Function (Sort a List Using a "Natural Order" Algorithm)
Single VS Double Quotes in JSON
Pandas Dataframe to List of Lists
Very Large Matrices Using Python and Numpy
Python Pandas Remove Duplicate Columns
Error After Upgrading Pip: Cannot Import Name 'Main'
Index a 2D Numpy Array with 2 Lists of Indices
Dictionary: Get List of Values for List of Keys
Shooting a Bullet in Pygame in the Direction of Mouse
Download File from Web in Python 3
Nested Arguments Not Compiling
Why Python 3.6.1 Throws Attributeerror: Module 'Enum' Has No Attribute 'Intflag'
How to Un-Escape a Backslash-Escaped String
How Are Post and Get Variables Handled in Python
What Is the Purpose of "Pip Install --User ..."
What Are the Differences Between the Threading and Multiprocessing Modules