Machine Learning Setup for Older Computers

[ ryn0f1sh ]
The Machine Learner
3 min readJan 4, 2024
Photo by Ugi K. on Unsplash

Hello Learners,

I love Machine Learning, I’ve been enjoying my journey so far, and really starting to find my niche a bit, but one of my consistent issues is the slowness of the old machine that I’m using.

Here is what I’m working with at the moment:
CPU: Intel(R) Core(TM) @ 1.60ghz 1.80GHz.
RAM: 8GB.
OS: Win 11 Home.

Not a bad little laptop, until I try to Machine Learn! I don’t have an external GPU, so everything I do is depended on that little CPU that could. So I’ve been trying different things to help make things as smooth as I possibly could.

I’ve tried a couple of things, and I didn’t really like them.
1. VS Code:
It was a bit too cumbersome for me, especially when I needed to ‘pip install’ something, just didn’t cooperate with me.

2. Anaconda Navigator:
Great tool, but very memory heavy on my machine, and even after I’ve installed something, the jupyter notebook had a hard time recognizing the installation, even after I restarted the kernel.

So I went the DIY Python Virtual Environment route.
I found this set up to be my favorite, and less memory intensive, since I’m using an older computer.

Step one: Install Python.
Setp two: Create your virtual environment(s).
Step three: Install the packages you need.
Step four: Go and Machine Learn!

Let me walk you through the steps one-by-one. (for Windows)

Step one: Install Python.
Go to python.org and download and install python.

Setp two: Create your virtual environment(s).

Install VirtualEnv
pip install virtualenv

To Create a Virtual environment:
python -m venv my_project

To Activate the environment:
myenv\Scripts\activate

To Deactivate the environment:
deactivate

Step three: pip Install some packages.

I recommend starting with these:
pip install scikit-learn jupyter pandas numpy

And you can add more as needed depending on the ML path or project that you are working on. I actually now create a different environment for each project or class, that way I have only what I need and not slow things down.

Step four: Go and Machine Learn!

Create a Kaggle account, and pick a class.
The whole platform is free, and classes are usually small, and has hands-on exercises, and you get a certificate of completion when your done.

I’m currently working through the ‘Data Cleaning’ course, and I’m LOVING it (both the method and the course).

So far this has been amazing, I also use “Windows Terminal” from the Microsoft App store, which is great, it allows me to open up 2 tabs in the command line windows, and I can log into my virtual environment in both. I use one to start the Jupyter Notebook Kernel, and I use the other one for any pip installs I might need to do, and response is QUICK! and so far this has been the best option for me.

So if your on an older machine, and are interested in the Machine Learning path, try this Python virtualenv + Jupyter method.

Thanks for reading.
Lets code something cool.
Ash, The Machine Learner.

Support The Project.
Buy me a coffee | Become my GitHub Sponsor | Become a Patreon | Ash’s Website

--

--

[ ryn0f1sh ]
The Machine Learner

Sudanese / Blogger / Pen Tester / Python Charmer / Machine Learner / Lover Of Outer Space / Coffee Drinker (https://www.buymeacoffee.com/execodeable)