How to Set Up a Python Development Environment on Windows

How to Set Up a Python Development Environment on Windows

Python is a programming language that is anything but easy to learn, yet capable and adaptable. Numerous expert programming engineers utilize Python consistently to carry out their activity, for both substantial ventures and little ones. Python is free, open source, and it keeps running on Windows, Mac, and Linux, and in addition numerous other working frameworks. It’s an extraordinary dialect in the event that you need to begin figuring out how to compose PC programs.

What You Need:-

  • Any Text Editor

Installing Python:-

Go to python.org and download the version of Python that you want. Download the latest version of Python. After download the executable file, Run it to install the program.

Installing Cygwin:- 

Cygwin is a program that can download and introduce different projects from the web for you. You’ll have to give it some data about your internet connection, albeit more often than not you can simply acknowledge the defaults and continue onward.

Go to the official site of Cygwin to download the executable setup file. Now, Cygwin will show you a long list of download sites. Each one is exactly the same, you can pick anyone. You don’t need to pick the same download site shown in the picture below. After picking one, clicked the “next” button, you’ll see an upgrade warning, but that only applies to people upgrading from an older version of Cygwin. Since this is a new installation, we can ignore it. You should download the latest version to avoid this message.

Now, you get to select which software you want to install from the download site. You have to install three software packages: Openssh, Git, and Curl. For each one, use the search box to find the package, and then click on the word “Skip” so that it changes to a version number. Install the latest available version.

Next, Cygwin will tell you that you need to install certain other packages as dependencies. Basically, this means that if you want to use a certain package named A, and A relies on another package named B in order to run correctly, then Cygwin will detect this and ask to install package B as well. You can just hit “Next”. At that point, Cygwin will start downloading and installing all the packages that you’ve requested, as well as all their dependencies. Depending on the speed of your internet connection, this may take a little while. When the middle of the three progress bars (the one marked “Total”) is full, Cygwin is finished.

If you ask Cygwin to install an icon on your desktop, it will do so, creating a shortcut named “Cygwin Terminal”. You’ll use this icon to run your Python code, as well as to access the openssh, git, and curl packages that you installed. Double-click the icon to run Cygwin Terminal, and you’ll see a window like this pop up:

The exact text in your terminal window may be a little different, it depends on the name of your computer, and the name of your user account. Now we can start using the terminal: First, let’s use the which command to find out where those packages are that we installed:

The exact text in your terminal window may be a little different, it depends on the name of your computer, and the name of your user account. Now we can start using the terminal: First, let’s use the which command to find out where those packages are that we installed:

Now terminal can find ssh and git, but not python. That’s understandable, since we didn’t use Cygwin to install Python. Run the following command to tell Cygwin how to find Python,

echo “PATH=\$PATH:/cygdrive/c/Python32” >> .bash_profile

you’re using the same directory that you installed Python into: if you’re installing a different version of Python, then replace Python32 with the version of Python you have installed. You should only need to do this once: after you’ve run that command, the terminal will always be able to find Python again.

You’re done. Cygwin has been installed successfully. 🙂

Add a Comment

Your email address will not be published. Required fields are marked *

five − 2 =