“E: Unable to locate package python3-pip” Error and Solution

Python provides the pip3 package in order to search, install, update, and remove Python packages. It is named Python3-pip and installed in the current Ubuntu distribution. Especially for the old versions of Ubuntu, we can get the “E: Unable to locate package python3-pip” error. In this tutorial, we examine this error and how to solve … Read more

How To List All Timezones In Python?

Python provides the pytz module for timezone information and related operations. Timezones are used to describe different time zones over the world by using city names. Generally, a country has a single time zone but some large countries like Russia, the USA, and China have multiple timezones depicted with the city names. In this tutorial, … Read more

Python Datetime.now() Tutorial

Python provides the datetime module for date and time-related operations. The datetime module can be used to get current date and time information like year, month, day, hour, minute, second, etc. The datetime.now() module is used to return current date and time information. Import datetime In order to use the datetime.now() method we should import … Read more

Uninstall Python Package with Pip

Python packages are used to add new libraries and features to Python. The Python packages can be uninstalled with different methods which are also related to those packages’ installation methods. Most of cases the pip package manager is used to installing, update and uninstall Python packages. Search Python Package Before uninstalling the Python package we … Read more

How To Use subprocess.check_output() In Python?

Python provides the subprocess module in order to spawn new processes and connect their input, output, and errors and get the return codes about the process. The subprocess is created to replace os.system and os.spawn* modules. The subprocess.check_output() method is used to check the subprocess output. subprocess.check_output() Syntax The subprocess.check_output() method has the following complex … Read more