I’m working on step 3 (Loading Chunks Into SQLite) of the Analyzing Startup Fundraising Deals from Crunchbase Guided Project. The instructions ask me to use the !wc IPython command to return the file size of the SQLite database I’ve created. However when I type the following into a cell in my Jupyter notebook, I get an error:
‘wc’ is not recognized as an internal or external command, operable program or batch file.
From the searching I have done, I gather this might be because I’m working wc is a Unix command and I am working on Windows.
I’m also not sure how to check the database size even if I could get my notebook to recognize !wc. I assume I would need the path to the SQLite database? If so, I’m not sure how to get that either.
What is the best way to get the size of an SQLite database on Windows?
wc simply counts all the words or bytes or word lines in a file. It may count the size of a database depends on the command.
To get the database file, you have to download manually.
Either you find a window PowerShell alternative to wc command or install linux.
If you are using Windows 10, you have to enable the window subsystem for Linux. And, it will install the whichever linux distribution you chose - e.g. Ubuntu kernel, and the bash shell onto windows. Then, you can use some of Linux commands on windows.
I do not use Windows OS and would not be advice on any further setup.
Here are some setup tutorial on getting windows subsystem for Linux:
If you have not use any linux/unix distribution before, I recommend you to use Ubuntu. Ubuntu 16.04 is the previous LTS (Long Term Support) which has lesser bugs. Ubuntu 18.04 is the latest LTS which has more bugs. Use Ubuntu 16.04 if you like to have less issues to fix.
However, installing windows subsystem for Linux does not gives a full Linux experiences. Not all Linux commands are available.
Also, linux/unix commands is heavily used in the data science field. It’s good to have some kind of linux terminal experience on your resume.
The best option is to do a dual boot with a linux/unix OS if your computer has the necessary space.
Thanks Alvin! That makes sense. After reading your solution, I realized I do have git bash installed, so I was able to use the wc command in the git bash terminal with no problems. Maybe I’ll give the Linux subsystem set up a try as well. Thanks again for your reply!
@cvandeg, You are welcome.