Although I am a big fan of MATLAB, it’s time for me to really try out Python so I can fairly compare the pros and cons of both languages.

The first tiny hurdle for Python is its scattered installation process for Windows. I thought Python(x,y) will give me everything in one place, but turns out the Spyder is stuck in Python 2.7. To install Python 3.7, I’ll need to do it from scratch. Here are the steps:

- Download official Python 3 (https://www.python.org/downloads/windows/). You will need that for the “pip” package manager
- In command prompt anywhere,

pip install scipy

It might complain that {python37}/scripts is not in PATH variable, but I checked and the folder is already in PATH. Can safely ignore it. - I took the advice to upgrade PIP. Can run it anywhere in command prompt

python -m pip install –upgrade pip - Now I’ll need Spyder3, a MATLAB-like IDE. Qt5 is one of the pre-req:

pip3 install PyQt5 - And finally Spyder3

pip install Sypder - PyVISA is the analog of “Instrument Control Toolbox” in MATLAB.

pip install pyvisa - Turns out that only NumPy and IPython is installed with SciPy, not the entire ecosystem.

pip3 install pandas

pip3 install matplotlib

If you know the power of dataset/table objects in MATLAB like I do, you’ll jump for dataframes in panadas. - SymPy, the analog of MATLAB’s symoblic math toolbox, needs to be installed separately

pip3 install sympy - IPython gives the ‘notebook’ feel in Mathematica, MathCAD and Maple, where the returned results are directly pasted in the same area where your command/syntax is. I rarely cared for it because I usually want the max visual real estate for my plots.

pip does not install icons in your start menu. So I’ll need to manually create a shortcut

“{Python37}/Scripts/spyder3.exe”

.py files are not associated with Spyder3 (normally it’ll just directly run the python script with python3). I usually manually change the association in Windows to Sypder3.

171 total views, 1 views today

## Leave a Reply