Skip to content

Commit 365792d

Browse files
[Doc] Add more contrib and more installtion method (#760)
* add 3 install method in README.md * add more contributors
1 parent 0a62d0c commit 365792d

File tree

3 files changed

+53
-18
lines changed

3 files changed

+53
-18
lines changed

README.md

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,50 @@ python -c "import paddle; paddle.utils.run_check()"
130130

131131
### 安装 PaddleScience
132132

133-
1. 执行以下命令,从 github 上 clone PaddleScience 源代码,并以 editable 的方式安装 PaddleScience。
133+
1. 基础功能安装
134134

135-
<!-- --8<-- [start:git_install] -->
136-
``` shell
137-
git clone -b develop https://github.com/PaddlePaddle/PaddleScience.git
138-
# 若 github clone 速度比较慢,可以使用 gitee clone
139-
# git clone -b develop https://gitee.com/paddlepaddle/PaddleScience.git
135+
**从以下三种安装方式中,任选一种均可安装。**
140136

141-
cd PaddleScience
137+
- git 源码安装[**推荐**]
142138

143-
# windows 用户安装前请执行如下命令,否则可能因为gbk编码问题导致安装失败
144-
set PYTHONUTF8=1
139+
执行以下命令,从 github 上 clone PaddleScience 源代码,并以 editable 的方式安装 PaddleScience。
140+
<!-- --8<-- [start:git_install] -->
141+
``` shell
142+
git clone -b develop https://github.com/PaddlePaddle/PaddleScience.git
143+
# 若 github clone 速度比较慢,可以使用 gitee clone
144+
# git clone -b develop https://gitee.com/paddlepaddle/PaddleScience.git
145145

146-
# install paddlesci with editable mode
147-
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
148-
```
149-
<!-- --8<-- [end:git_install] -->
146+
cd PaddleScience
147+
148+
# windows 用户安装前请执行如下命令,否则可能因为gbk编码问题导致安装失败
149+
set PYTHONUTF8=1
150+
151+
# install paddlesci with editable mode
152+
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
153+
```
154+
<!-- --8<-- [end:git_install] -->
155+
156+
- pip 安装
157+
158+
执行以下命令以 pip 的方式安装最新版本的 PaddleScience。
159+
<!-- --8<-- [start:pip_install] -->
160+
``` shell
161+
pip install -U paddlesci
162+
```
163+
<!-- --8<-- [end:pip_install] -->
164+
165+
- 设置 PYTHONPATH
166+
167+
如果在您的环境中,上述两种方式都无法正常安装,则可以选择本方式,在终端内将环境变量 `PYTHONPATH` 临时设置为 `PaddleScience`**绝对路径**,如下所示。
168+
169+
``` shell
170+
cd PaddleScience
171+
export PYTHONPATH=$PYTHONPATH:$PWD # for linux
172+
set PYTHONPATH=%cd% # for windows
173+
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple # manually install requirements
174+
```
175+
176+
注:上述方式的优点是步骤简单无需安装,缺点是当环境变量生效的终端被关闭后,需要重新执行上述命令设置 `PYTHONPATH` 才能再次使用 PaddleScience,较为繁琐。
150177

151178
2. 验证安装
152179

@@ -212,8 +239,12 @@ PaddleScience 作为一个开源项目,欢迎来各行各业的伙伴携手共
212239
[MayYouBeProsperous](https://github.com/MayYouBeProsperous),
213240
[AndPuQing](https://github.com/AndPuQing),
214241
[lknt](https://github.com/lknt),
215-
[yangguohao](https://github.com/yangguohao),
216242
[mrcangye](https://github.com/mrcangye),
243+
[yangguohao](https://github.com/yangguohao),
244+
[ooooo-create](https://github.com/ooooo-create),
245+
[megemini](https://github.com/megemini),
246+
[DUCH714](https://github.com/DUCH714),
247+
[zlynna](https://github.com/zlynna),
217248
[jjyaoao](https://github.com/jjyaoao),
218249
[jiamingkong](https://github.com/jiamingkong),
219250
[Liyulingyue](https://github.com/Liyulingyue),

docs/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,12 @@
214214
<a href="https://github.com/MayYouBeProsperous"><img class="avatar" src="https://avatars.githubusercontent.com/MayYouBeProsperous" alt="avatar" /></a>
215215
<a href="https://github.com/AndPuQing"><img class="avatar" src="https://avatars.githubusercontent.com/AndPuQing" alt="avatar" /></a>
216216
<a href="https://github.com/lknt"><img class="avatar" src="https://avatars.githubusercontent.com/lknt" alt="avatar" /></a>
217-
<a href="https://github.com/yangguohao"><img class="avatar" src="https://avatars.githubusercontent.com/yangguohao" alt="avatar" /></a>
218217
<a href="https://github.com/mrcangye"><img class="avatar" src="https://avatars.githubusercontent.com/mrcangye" alt="avatar" /></a>
218+
<a href="https://github.com/yangguohao"><img class="avatar" src="https://avatars.githubusercontent.com/yangguohao" alt="avatar" /></a>
219+
<a href="https://github.com/ooooo-create"><img class="avatar" src="https://avatars.githubusercontent.com/ooooo-create" alt="avatar" /></a>
220+
<a href="https://github.com/megemini"><img class="avatar" src="https://avatars.githubusercontent.com/megemini" alt="avatar" /></a>
221+
<a href="https://github.com/DUCH714"><img class="avatar" src="https://avatars.githubusercontent.com/DUCH714" alt="avatar" /></a>
222+
<a href="https://github.com/zlynna"><img class="avatar" src="https://avatars.githubusercontent.com/zlynna" alt="avatar" /></a>
219223
<a href="https://github.com/jjyaoao"><img class="avatar" src="https://avatars.githubusercontent.com/jjyaoao" alt="avatar" /></a>
220224
<a href="https://github.com/jiamingkong"><img class="avatar" src="https://avatars.githubusercontent.com/jiamingkong" alt="avatar" /></a>
221225
<a href="https://github.com/Liyulingyue"><img class="avatar" src="https://avatars.githubusercontent.com/Liyulingyue" alt="avatar" /></a>

docs/zh/install_setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454

5555
执行以下命令以 pip 的方式安装最新版本的 PaddleScience。
5656

57-
``` shell
58-
pip install -U paddlesci
59-
```
57+
--8<--
58+
./README.md:pip_install
59+
--8<--
6060

6161
=== "设置 PYTHONPATH"
6262

0 commit comments

Comments
 (0)