Starting Python twice as an engineer who had never programmed
How I started Python twice, first in a hosted notebook with nothing installed and then on my own computer where the setup took most of the effort, with the errors I hit and the order I would install things in now.
I have a PhD in chemical engineering and had done no programming when I asked Claude to teach me machine learning from the ground up, with examples I can relate to. It asked me a few things first, and my answers were that I had no experience with Python and no understanding of neural networks, and that I wanted both the fundamentals and the applications. The plan I picked had Anaconda as the first install. Anaconda is a large bundle of Python and scientific libraries. I did not install it then, so I cannot say anything for or against it.
In the browser first
The next day I asked for an online platform instead of a local install, and went with Google Colab. Colab calls itself a hosted Jupyter Notebook service that requires no setup.11Google, Colaboratory FAQ: “Colab is a hosted Jupyter Notebook service that requires no setup to use”; “Colab resources are not guaranteed and not unlimited”. A notebook is a page of boxes called cells. You type code in a cell, run it, and the result shows under it. I ran the first cell and saw output.
A few days later I started a proper course with Claude, close to midnight, and all of it was in Colab. The order was the language itself first (variables, operations, lists, dictionaries, control flow, functions), then NumPy for arrays. The next evening it was pandas for tables, then matplotlib and seaborn for plots, then the scikit-learn workflow for fitting models. If you think in spreadsheets, a pandas dataframe is close to a worksheet with named columns.
So in that first week nothing was installed on my computer, and I think that was right for me. The machine is Google’s, and they say the resources are not guaranteed and not unlimited,11Google, Colaboratory FAQ: “Colab is a hosted Jupyter Notebook service that requires no setup to use”; “Colab resources are not guaranteed and not unlimited”. but for learning the language that did not matter.
On my own computer
About two and a half months later I wanted to do a small analysis myself, step by step, in VS Code. It was public employment data on chemical engineers. I already had VS Code from the day before. Claude had built a first version of the analysis, and then I insisted on doing all of it on my own computer.
The setup was a fight. First I typed “matpilotlib” in the pip install line. Then pandas was not found inside the virtual environment I had made, and the message was:
Python was not found
Windows has a command named python that is only a shortcut to the Microsoft Store, and it was getting in front of the Python in my environment. The Python documentation for Windows now recommends the Python install manager, and it has a troubleshooting entry for this case that points to the “Manage app execution aliases” setting.22Python documentation, Using Python on Windows: the Python install manager, and the troubleshooting entry for python giving “command not found” or opening the Store app. I installed Python 3.14.3 through the install manager and added its folder to PATH. Then I could not remove the old environment folder because it was still in use. Then pip wanted an upgrade, from 25.3 to 26.0.1. After that it said “All good”, and I had a Jupyter server running on localhost:8888.
A virtual environment, or venv, is a folder that holds the libraries one project needs, kept apart from every other project.33Python documentation, venv: what a virtual environment is, the creation and activation commands, and the note on Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. The reason is that two projects can need different versions of the same library, and one installation of Python holds only one of them.44The Python tutorial, chapter 12: applications that need different versions of the same library, and python -m pip install. It is like keeping a separate set of fittings for each skid, so work on one leaves the other alone. You make it with three lines in the terminal, typed in the project folder:
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install pandas numpy scikit-learn matplotlib jupyter
The first line makes the environment, the second switches the terminal to it, and the third installs into it. On Windows the second line can be refused because PowerShell does not allow scripts by default. I had met that the day before with npm, where the message was “running scripts is disabled”, and the fix is the same one the venv documentation gives:33Python documentation, venv: what a virtual environment is, the creation and activation commands, and the note on Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Two days after that I moved another analysis from the browser to my own computer, because waiting for Claude to run it there was taking too long. It was the same steps again, a venv and a pip install, and then a script file. I switched to Jupyter when I saw it would be easier cell by cell.
The day after, I started in a new folder and ran the first script from a plain PowerShell window. It failed on a unicode escape in the script’s own docstring. Then it failed because pandas was not there, and then pip was not on the path in that window at all. So I went back to Jupyter in the venv, and told Claude to stop making me repeat my setup every time.
I think the pandas and pip failures were the same problem, that the plain PowerShell window was not using the Python my libraries were installed into. What I wrote down that night was to set up the venv in Jupyter from the start and skip the PowerShell detour.
The order I would use now
If I started again I think I would do it in the same order. First a hosted notebook, until the language, NumPy, pandas and plotting are familiar. Then on my own computer I would install Python itself from python.org, then VS Code, then make a project folder with a venv in it, then install the libraries with pip inside that venv, and Jupyter inside the same venv.
Git I would leave for later. I met it in that same local week, because the analysis was going to a public repository, and it took a .gitignore file, setting my name and email, and one commit. It is useful, but I did not need it to get a first plot.
I should also say that in both weeks Claude wrote most of the code. I ran it and asked what each part did. I am not sure how much of it I could have written from a blank page at that time.
Footnotes
-
Google, Colaboratory FAQ: “Colab is a hosted Jupyter Notebook service that requires no setup to use”; “Colab resources are not guaranteed and not unlimited”. ↩ ↩2
-
Python documentation, Using Python on Windows: the Python install manager, and the troubleshooting entry for
pythongiving “command not found” or opening the Store app. ↩ -
Python documentation, venv: what a virtual environment is, the creation and activation commands, and the note on
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. ↩ ↩2 -
The Python tutorial, chapter 12: applications that need different versions of the same library, and
python -m pip install. ↩
Sources
- Google. Colaboratory frequently asked questions. https://research.google.com/colaboratory/faq.html
- Python Software Foundation. Using Python on Windows. Python 3 documentation. https://docs.python.org/3/using/windows.html
- Python Software Foundation. venv, creation of virtual environments. Python 3 documentation. https://docs.python.org/3/library/venv.html
- Python Software Foundation. Virtual environments and packages. The Python tutorial, chapter 12. https://docs.python.org/3/tutorial/venv.html