Start To Learn Python Right Now EP02: Install Python & Setup PIP


In the Before post, we talked about the reason we need to learn Python and a short introduction about it. You can read the post by clicking here. Now, we need to install a Python interpreter to start working with it. An interpreter is the language support and basic development environment that supports developers to work with the language.

Download & Installing Python

 1. Just Go to Python.org and download the Python with the version you want according to your systems such as Windows, MAC & Linux with 32bit or 64bit support.


2. Click the Installer and open it like a normal setup. 


3. After opening the setup you'll see some options, you need to check the box in the setup called;
  •                              'Install launcher for all users
  •                              'Add Python 3.10 to PATH'
     Also, the 'Install Now' option is the recommended option for installation, however, you can also select the customized installation for a custom setup. but I'm not recommending it because you can miss some important functionalities like PIP. Then choose Install and setup will install the Python. After normal installation.

4. You can open the installed Python IDLE version or Python.exe to stat Python programming.


Python IDLE

Python exe


Learn PIP in Python.

    Now you need to check whether PIP working or not. PIP is the default package manager in Python. Actually, you can't install any third-party package without PIP. Follow the below steps to learn PIP.

1. open your command prompt and just type 'pip' then hit enter. You will get a list of commands like the below image. if you get an error msg saying no command called 'PIP', it means pip not installed in your pc while installing Python setup. The only option to avoid that is reinstalling the Python setup.


2. usual commands using in Python pip
  •     pip install package-name - this command is used to install a third-party Python package.
  •     pip uninstall package-name - this command is used to uninstall a third-party Python package
  •     pip list - this command is used to check the installed packages in Python 
  •     pip --version or pip -V - this command is used to check the version of pip 
  •     python.exe -m pip install --upgrade pip - this command is used to upgrade pip version
 
pip list

upgrading pip

Switch between two Python versions

  You can install a number of Python versions as I mentioned above, Also those versions install a pip version by default. But how do you install packages for a specific version or work with a specific version? You can do it as bellow mentioned. 
    I have Python 3.5 and 3.9 versions now. You can view all installed Python versions by typing py --list in the command prompt.

You can install or uninstall a python package for a specific Python version by typing pip-Python-Version (pip3.9) install package-name.
    ex: pip3.9 install PyQt5
you can execute any pip command like above I mentioned. 


Post a Comment

If you have any doubt, Let us know

Previous Post Next Post