Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add virtual environment configuration part into Python README.md #524

Merged
merged 1 commit into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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