Jupyter Notebook issue | Sololearn: Learn to code for FREE!

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"?

3/18/2020 8:27:53 PM

Geanina Sava

7 Answers

New Answer

+1

How you are running command and where? And what is cat in python.

+1

Is there a string or what make brief

+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

+1

Geanina Sava First you need to go on that location where your python is installed then run that command. Hope it will run.

+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

+1

You can try !type data_file/sample.txt

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