0

Jupyter Notebook issue

Does anyone know why when I try to run the command "!cat" the following error appears: "!cat is not recognized as internal or external comand"?

18th Mar 2020, 8:27 PM
Geanina Sava
Geanina Sava - avatar
7 Answers
+ 1
How you are running command and where? And what is cat in python.
18th Mar 2020, 8:31 PM
A͢J
A͢J - avatar
+ 1
Is there a string or what make brief
18th Mar 2020, 8:36 PM
Nature of me
Nature of me - avatar
+ 1
So I want to run the following command !cat data_file/sample.txt (data_file is the folder where we can find the txt file called sample.txt) The result that I want to see when running this command is the content of the sample.txt . Instead I receive The following error: 'cat' is not recognized as an internal or external command, operable program or batch file
18th Mar 2020, 8:51 PM
Geanina Sava
Geanina Sava - avatar
+ 1
Geanina Sava First you need to go on that location where your python is installed then run that command. Hope it will run.
18th Mar 2020, 8:55 PM
A͢J
A͢J - avatar
+ 1
Geanina Sava To run command from anywhere you need to set path of installed python directory to system environment variable. To check how to set path you can see this tutorial. https://www.tutorialspoint.com/python/python_environment.htm
18th Mar 2020, 8:59 PM
A͢J
A͢J - avatar
+ 1
You can try !type data_file/sample.txt
9th Mar 2021, 6:22 PM
Ignatius Boadi
Ignatius Boadi - avatar
0
In jupyter notebook. I try to learn python at this moment.. As far as I know cat is used for reading a text file
18th Mar 2020, 8:35 PM
Geanina Sava
Geanina Sava - avatar