You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2023/05/26 02:16:08 UTC

[rocketmq-clients] branch master updated: Add virtual environment configuration part into Python README.md (#524)

This is an automated email from the ASF dual-hosted git repository.

aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a3aed90 Add virtual environment configuration part into Python README.md (#524)
7a3aed90 is described below

commit 7a3aed90e4fb9f0e8ae4c06cd1a0c6c3430179ab
Author: Aaron Ai <ya...@alibaba-inc.com>
AuthorDate: Fri May 26 10:16:03 2023 +0800

    Add virtual environment configuration part into Python README.md (#524)
---
 .gitignore          |  1 +
 python/README-CN.md | 19 ++++++++++++++++++-
 python/README.md    | 21 +++++++++++++++++++--
 3 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 683bcd49..c917b4bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,4 +51,5 @@ golang/*.exe
 *.pyc
 *.pyo
 *.pyd
+python/myvenv/
 python/__pycache__/
\ No newline at end of file
diff --git a/python/README-CN.md b/python/README-CN.md
index a02e98c6..bc417119 100644
--- a/python/README-CN.md
+++ b/python/README-CN.md
@@ -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
+```
 
 ## 目前进展
 
diff --git a/python/README.md b/python/README.md
index ee388872..4bb60f8a 100644
--- a/python/README.md
+++ b/python/README.md
@@ -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/)).
 
@@ -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