- Download Python:
- Visit the official Python website at python.org .
- Navigate to the "Downloads" section.
- Download the latest version of Python for Windows.
- Run the Installer:
- Run the downloaded installer.
- Check the box that says "Add Python to PATH" during installation.
- Verify Installation:
- Open a command prompt and type:
python3 --version
- Install Python:
- Python is often pre-installed on Linux. To install or update Python, use your package manager:
sudo apt update
sudo apt install python3
- Verify Installation:
- Open a terminal and type:
python3 --version
- Open a Command Prompt:
- Open a command prompt or PowerShell.
- **Install **
**virtualenv:**
pip install virtualenv
Create a Virtual Environment:
- Navigate to your project directory.
- Create a virtual environment by running:
python -m venv venv
Activate the Virtual Environment:
- Activate the virtual environment:
.\venv\Scripts\activate
- Open a Terminal:
- Open a terminal.
- **Install **
**virtualenv:**
sudo apt install python3-venv
Create a Virtual Environment:
- Navigate to your project directory.
- Create a virtual environment by running:
python3 -m venv venv
Activate the Virtual Environment:
- Activate the virtual environment:
source venv/bin/acivate
To deactivate the virtual environment, simply run:
deactivate
pip install -r requirements.txt
- Download the PostgreSQL installer from the official website.
- Run the installer and follow the on-screen instructions.
- During installation, you'll be prompted to set a password for the default
postgres
user.
- Install PostgreSQL using your distribution's package manager. For example, on Ubuntu, you can run:
sudo apt update
sudo apt install postgresql postgresql-contrib
- Install PostgreSQL using Homebrew. Run the following command in your terminal:
brew install postgresql
- After installing PostgreSQL, you can access the PostgreSQL command-line interface (CLI) using the following command:
psql -U postgres
- Once you are in the PostgreSQL CLI, you can create and setup a new database using the following SQL command:
CREATE DATABASE mydatabase;
CREATE USER myuser WITH PASSWORD 'mypassword';
GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser;
- You can access PostgreSQL using the pgAdmin tool, which is installed along with PostgreSQL on Windows.
- Access PostgreSQL using the
psql
command-line tool:
psql -U myuser -d mydatabase -h localhost -p 5432
Run the Application:
python console.py webapi serve
- This will serve the webapi on http://127.0.0.1:8000/ or http://localhost:8000/ .
- You should see the webapi application running.
python console.py salesapi serve
- This will serve the salesapi on http://127.0.0.1:8002/ or http://localhost:8002/ .
- You should see the salesapi application running.
python console.py rpc serve
- This will serve the rpc on http://127.0.0.1:8003/ or http://localhost:8003/ .
- You should see the rpc application running.
arq webapi.webapi.worker_swarm.general_worker.WorkerSettings
- This will serve the redis Jobqueue for webapi