Skip to main content

I am Learning Python 1 - Adding Environment Variable for Python in Windows 10 Home

I'm trying to learn Python this year (2018). The reasons are to explore its uses in data science, which is a skill that's becoming increasingly important since last 4-5 years.

A disclaimer first - I'm not a programmer by profession and have taken some programming courses in college. But as saying goes these days - everybody's a programmer, either by choice or just have to pick up the skill. And it's a good skill to have!

That's my motivation for learning Python. One of the first things I realized is that I need some online classes and a local environment to practice. The best resource for the online material is Python classes by Google, which you can access here.

And the best version to learn (at least if you're reading this in 2018) is 2.7.x. If you want to try your hand at later versions, you can go ahead. You can download it here.

Once you've installed it on Windows (I don't have a mac!) you would want to execute Python code from Window's command line. Here I had to do some digging so I'm sharing what I did.

So Step 1 - install the Python version.

Step 2 - Change the environment variable to execute Python code on the command line in Windows.

These steps are for Windows 10 Home.

Right-click on 'This PC' and select Properties. It should open a new window for 'System'. Select 'Advanced system settings'. Then click on 'Environment Variables' shown in the first screenshot. And then change the 'Path' environment variable under user variables for your user and add the three entries as below.


This should help you run Python from Windows command line. And the best way to check if everything is working; by going to the command prompt ('cmd') and type Python, you should see something as below:

If you encounter any issues, I think the best way is to Google or use StackOverflow. But these steps helped a complete amateur like me to get started. Enjoy!

Comments

Popular posts from this blog

Scuba Diving 36 feet deep in Goa (Surreal but Nice!)

"Surreal but nice" that's what Hugh Grant's character managed to blurt out, mesmerized by the beauty of Julia Roberts (in the movie Notting Hill ). And this was the exact thought that was running in my mind as I was rising from a depth of over 35 feet under water in the Arabian Sea near Goa, India. I had just finished my first dive (rather second dive of my first dive) with grouper fish, tailor fish - and many more - knelt at the bottom of the ocean floor and touched a ship wreck that sunk more than sixty years ago! It was a surreal experience that has left me with a feeling of self-satisfaction as well as endless curiosity. The two feelings very rarely take a house together in my mind. Probably the last time they shacked up together was when I got an admit for my Master's from State University of New York . The feeling of gliding underwater among the fishes, water pressure trying to burst your ears drums, flying over huge boulders of rocks under sea; like an un...
The debate on Times Now Summit 2022 between Salman Khurshid, Dr. Vikram Sampath, Sai Deepak, and Pavan K Varma showed how disconnected the left, right, and the middle are from each other.  We all know these 'luminaries',  as Rahul Shivshankar, Editorial Director & Editor-in-Chief  @TimesNow introduces them.  How left and right  do not apply to Indian political viewpoints  is a matter for another time, therefore pardon my use of the western paradigm of left and right for the rest of this blog post. Times Now Debate, 2022 We all know Sai Deepak through his YouTube debate with  Asaduddin Owaisi  (Sai Deepak in fact moderated the debate) a few years back. And since then he has authored a couple of books on the historical context that surrounded the drafting of the constitution of India between 1946 to 1950. His first book on India, that is Bharat forced us to rethink colonialism and introduced an entirely distinct scholarly way to look at middle-e...