I am following a video tutorial and that guy did this:
$ pip freeze --local > requirement.txt
$ cat requirement.txt
this is to export all these packages with their versions in another project, but how:
- what is
pip freeze
? and - what is that
requirement.txt
? are we supposed to export all those packages in a txt file, how can .txt file do that does it grab their name? what is the word
cat
in second line? my machine can't understand either of those, but in his computer they were working, my machine says:As you can see
cat
is not recognized.
Then I look in virtualenv directory to search for requirement.txt and I find this
Yes, requirement.txt
is zero bytes, nothing in it.
What is the problem?
Next I googled for what is pip freeze
and what is cat
? I couldn't find a simple definition for cat. but here is pip freeze
Usage : pip freeze [options] Description Output installed packages in requirements format.
packages are listed in a case-insensitive sorted order.
What is "requirements format"? Is that a text file?
Then I came to this question in Stack Overflow: How to freeze packages installed only in the virtual environment?
Does he means how do I preserve packages with a layer of ice in my virtual environment?
cat
is a Linux command: man7.org/linux/man-pages/man1/cat.1.htmlpip freeze
dumps a list of your Python packages into the file you specify, you will need this when deploying a project but it's pointless before you even start developing.cat
just outputs the contents of the file to the terminal, and this command only works on Unix-based systems (eg Linux), not Windows. If you're completely new to Python I would advise to learn the basics of the language first, including usingpip
and virtual environments, then learn Django when you're comfortable with Python.