Open In App

How to Install py-bottle on Windows?

py-bottle is a lightweight micro-framework for developing small web apps. It supports request dispatching (Routes) with URL parameter support, templates, a built-in HTTP Server, and adapters for several third-party WSGI/HTTP-server and template engines are all included in a single file with no dependencies except the Python standard library. In this article, we will see how to install py-bottle on Windows. 

Installing py-bottle on Windows 

Method 1: Installing  py-bottle package using pip 



Follow the below steps to install the py-bottle package on Windows using pip:

Step 1: First we install the current version of Python3 on Windows.



Step 2: Now we check if pip3 and python3 are installed or not in Windows by checking their versions.

python –version

pip –version

Step 3: Using the following command we upgrade pip3 to avoid getting errors during the installation.

pip install –upgrade pip

Step 4: Use the following command to install py-bottle using pip3.

pip install bottle

Method 2: Installing py-bottle using setup.py 

Follow the below steps to install the py-bottle package on Windows using the setup.py file:

Step 1: First of all download the latest source package of py-bottle for Python3 from the website.

curl https://files.pythonhosted.org/packages/ea/80/3d2dca1562ffa1929017c74635b4cb3645a352588de89e90d0bb53af3317/bottle-0.12.19.tar.gz > bottle.tar.gz

Step 2: Using the following command extract the downloaded py-bottle package.

tar -xzvf bottle.tar.gz

Step 3: Using the following command go inside the bottle-0.12.19 folder to install the package.

cd bottle-0.12.19

python setup.py install

Verifying py-bottle installation on Windows:

To check py-bottle is successfully installed in Windows use the following command in the Python terminal. If you get an error while importing the package then that means the package was not installed properly.

import bottle

Article Tags :