Rajendra Dharmkar

Rajendra Dharmkar

160 Articles Published

Articles by Rajendra Dharmkar

Page 12 of 16

How to install Python modules in Cygwin?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 2K+ Views

Cygwin is a Unix-like environment for Windows that allows you to run Linux commands and tools. To install Python modules in Cygwin, you need to set up the Python package management tools first. Installing Prerequisites During Cygwin installation, make sure you select the following packages from the package list: python − Python interpreter python-setuptools − Python package installation utilities The python-setuptools package will install the easy_install tool, which is needed for the next step. Installing pip Once you have easy_install available, you can use it to install pip, which is the standard ...

Read More

What is the convention for structuring Python modules?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 259 Views

Python module structuring follows established conventions that make projects maintainable, distributable, and easy to navigate. Here's the standard structure used by most Python projects. Standard Python Project Structure Here is a sample project that shows a very good way to structure your projects: https://github.com/kennethreitz/samplemod The project is about creating the "sample" module. The directory structure looks as follows − README.rst LICENSE setup.py requirements.txt sample/__init__.py sample/core.py sample/helpers.py docs/conf.py docs/index.rst tests/test_basic.py tests/test_advanced.py File and Directory Explanations README.rst This file provides a brief description of the module, how to set it up, how to ...

Read More

How to set up your python development environment on AWS?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 506 Views

Setting up a Python development environment on AWS involves installing required tools, creating a virtual environment, and configuring AWS Elastic Beanstalk for deployment. This guide covers the complete setup process from installation to deployment. Prerequisites You need to have Python, pip, virtualenv, AWS EB CLI and a SSH client installed to set up your Python Development Environment on AWS. You can follow instructions at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html to install these tools. Creating a Virtual Environment Once you have all tools installed, you need to set up a virtual environment so that your global packages do not get polluted. ...

Read More

How to deploy python modules on Heroku?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 425 Views

Heroku is a cloud platform that makes it easy to deploy Python applications. This guide walks you through deploying a Python module to Heroku using Git and the Heroku CLI. Prerequisites Before deploying to Heroku, ensure you have − Python 3.6+ installed locally Pipenv or pip for dependency management Heroku CLI installed and logged in Git repository for your application Follow the official Heroku Python setup guide for initial configuration. Creating a Heroku Application Navigate to your project's root directory and create a new Heroku application ? $ heroku create ...

Read More

How do I get IntelliJ to recognize common Python modules?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 654 Views

IntelliJ IDEA needs to recognize your Python installation to provide code completion, syntax highlighting, and error detection for Python modules. This requires configuring the Python SDK properly in your project settings. Setting Up Python SDK To configure IntelliJ IDEA to recognize Python modules, you need to add a Python SDK to your project ? Step 1: Navigate to Project Structure File → Project Structure → Project → Project SDK → New Step 2: Select your Python interpreter path based on your operating system: Windows: C:\Python39 or C:\Users\YourName\AppData\Local\Programs\Python\Python39 Linux/macOS: /usr/bin/python3 or /usr/local/bin/python3 ...

Read More

What are the differences between json and simplejson Python modules?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 1K+ Views

Both json and simplejson are Python modules for working with JSON data, but they have key differences in availability, performance, and update frequency. What is json? The json module is part of Python's standard library since Python 2.6. It provides basic JSON encoding and decoding functionality ? import json data = {"name": "Alice", "age": 30, "city": "New York"} json_string = json.dumps(data) print(json_string) # Parse JSON back to Python object parsed_data = json.loads(json_string) print(parsed_data) {"name": "Alice", "age": 30, "city": "New York"} {'name': 'Alice', 'age': 30, 'city': 'New York'} What is ...

Read More

How to check version of python modules?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 5K+ Views

When you install Python, you also get the Python package manager, pip. You can use pip to get the versions of python modules and check them programmatically within your Python scripts. Using pip freeze Command If you want to list all installed Python modules with their version numbers, use the following command ? $ pip freeze You will get the output ? asn1crypto==0.22.0 astroid==1.5.2 attrs==16.3.0 Automat==0.5.0 backports.functools-lru-cache==1.3 cffi==1.10.0 ... Finding Specific Module Version On Linux/macOS (using grep) To individually find the version number you can grep on this ...

Read More

How to set your python path on Windows?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 1K+ Views

The PYTHONPATH environment variable tells Python where to look for modules and packages beyond the standard library. While modifying PYTHONPATH is rarely needed, here's how to set it on Windows when necessary. Accessing Environment Variables To set the PYTHONPATH on Windows, navigate to the system environment variables ? My Computer > Properties > Advanced System Settings > Environment Variables Alternatively, you can press Win + R, type sysdm.cpl, and press Enter to access System Properties directly. Setting the PYTHONPATH Variable In the Environment Variables dialog, look for PYTHONPATH under System Variables. If ...

Read More

How to set your python path on Mac?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 2K+ Views

Setting the PYTHONPATH on macOS helps Python locate modules and packages in custom directories. While there are several methods available, it's important to understand when and why to use each approach. What is PYTHONPATH? PYTHONPATH is an environment variable that tells Python where to look for modules and packages beyond the standard library and site-packages directories. Method 1: Temporary Export (Current Session Only) This method sets PYTHONPATH for the current terminal session only − export PYTHONPATH="${PYTHONPATH}:${HOME}/foo" This adds the foo directory in your home folder to Python's search path. The ${PYTHONPATH}: part ...

Read More

How to set your python path on Linux?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 1K+ Views

To set the PYTHONPATH on Linux to point Python to look in other directories for the module and package imports, you can use the export command. This is useful when you have custom modules or packages in non-standard locations. Setting PYTHONPATH Temporarily To add a directory to PYTHONPATH for the current terminal session ? $ export PYTHONPATH=${PYTHONPATH}:${HOME}/foo This command appends the foo directory to the existing PYTHONPATH without replacing its original value. Example Let's create a custom module and add its directory to PYTHONPATH ? $ mkdir ~/mymodules $ echo ...

Read More
Showing 111–120 of 160 articles
« Prev 1 10 11 12 13 14 16 Next »
Advertisements