Setting up Python on Windows 7
- Install Git Bash
- Install Anaconda - Python3 should be picked unless there’s a good reason to pick Python2. I have tried installing Python for Windows before but Anaconda is surely the way to go if being used for Data Science/Machine Learning. It takes up more space but it is easier to install and comes with so many useful packages out of the box.
- Python should automatically work in Git Bash. Use
python -i
to open the interpreter. Closing and reopening Git Bash should fix any issues with this.
Some handy commands
Installing a different version of Python
Conda lets us create different environments to easily manage this:
conda create -n py36 python=3.6 anaconda
conda create -n py27 python=2.7 anaconda
Then, to activate the py27 environment, activate py27
and to deactivate the current environment deactivate
.
See a list of conda environments
- conda env list