Skip to content

Commit

Permalink
Add virtual environment configuration part into Python README.md (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-ai authored May 26, 2023
1 parent 447c3be commit 7a3aed9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ golang/*.exe
*.pyc
*.pyo
*.pyd
python/myvenv/
python/__pycache__/
19 changes: 18 additions & 1 deletion python/README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,24 @@

## 快速开始

`rocketmq-clients/python`目录下使用命令:`pip install -r requirements.txt` 即可安装相关依赖库。
推荐使用 Python 虚拟环境进行开发,可以按照以下步骤操作:

首先切换到当前仓库的 `python` 子目录,然后执行以下命令创建一个新的虚拟环境:

```sh
python3 -m venv myvenv
```

其次开始激活虚拟环境。激活方法取决于具体的操作系统:

* 对于Windows,执行:`myvenv\Scripts\activate.bat`
* 对于macOS/Linux:执行:`source myvenv/bin/activate`

执行以下命令以安装所需的依赖库:

```sh
pip install -r requirements.txt
```

## 目前进展

Expand Down
21 changes: 19 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ English | [简体中文](README-CN.md) | [RocketMQ Website](https://rocketmq.apa

## Overview

Here is the python implementation of the client for [Apache RocketMQ](https://rocketmq.apache.org/). Different from the [remoting-based client](https://github.com/apache/rocketmq/tree/develop/client), the current implementation is based on separating architecture for computing and storage, which is the more recommended way to access the RocketMQ service.
Here is the Python implementation of the client for [Apache RocketMQ](https://rocketmq.apache.org/). Different from the [remoting-based client](https://github.com/apache/rocketmq/tree/develop/client), the current implementation is based on separating architecture for computing and storage, which is the more recommended way to access the RocketMQ service.

Here are some preparations you may need to know (or refer to [here](https://rocketmq.apache.org/docs/quickStart/02quickstart/https://rocketmq.apache.org/docs/quickStart/02quickstart/)).

Expand All @@ -13,7 +13,24 @@ Here are some preparations you may need to know (or refer to [here](https://rock

## Getting Started

To install the relevant dependency libraries, use the command "pip install -r requirements.txt" in the directory "rocketmq-clients/python".
Clone the current repository to your local machine and set up a virtual environment for development, which will help you manage dependencies more efficiently. Follow the steps below:

Navigate to the `python` subdirectory and execute the command below to create a new virtual environment:

```sh
python3 -m venv myvenv
```

Activate the virtual environment. The activation method depends on your operating system:

* For Windows, execute: `myvenv\Scripts\activate.bat`
* For macOS/Linux: execute: `source myvenv/bin/activate`

Install the required dependency libraries by executing the following command:

```sh
pip install -r requirements.txt
```

## Current Progress

Expand Down

0 comments on commit 7a3aed9

Please sign in to comment.