Skip to content

[Doc] Add more contrib and more installtion method #760

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

Merged
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
59 changes: 45 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,50 @@ python -c "import paddle; paddle.utils.run_check()"

### 安装 PaddleScience

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

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

cd PaddleScience
- git 源码安装[**推荐**]

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

# install paddlesci with editable mode
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
```
<!-- --8<-- [end:git_install] -->
cd PaddleScience

# windows 用户安装前请执行如下命令,否则可能因为gbk编码问题导致安装失败
set PYTHONUTF8=1

# install paddlesci with editable mode
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
```
<!-- --8<-- [end:git_install] -->

- pip 安装

执行以下命令以 pip 的方式安装最新版本的 PaddleScience。
<!-- --8<-- [start:pip_install] -->
``` shell
pip install -U paddlesci
```
<!-- --8<-- [end:pip_install] -->

- 设置 PYTHONPATH

如果在您的环境中,上述两种方式都无法正常安装,则可以选择本方式,在终端内将环境变量 `PYTHONPATH` 临时设置为 `PaddleScience` 的**绝对路径**,如下所示。

``` shell
cd PaddleScience
export PYTHONPATH=$PYTHONPATH:$PWD # for linux
set PYTHONPATH=%cd% # for windows
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple # manually install requirements
```

注:上述方式的优点是步骤简单无需安装,缺点是当环境变量生效的终端被关闭后,需要重新执行上述命令设置 `PYTHONPATH` 才能再次使用 PaddleScience,较为繁琐。

2. 验证安装

Expand Down Expand Up @@ -212,8 +239,12 @@ PaddleScience 作为一个开源项目,欢迎来各行各业的伙伴携手共
[MayYouBeProsperous](https://github.com/MayYouBeProsperous),
[AndPuQing](https://github.com/AndPuQing),
[lknt](https://github.com/lknt),
[yangguohao](https://github.com/yangguohao),
[mrcangye](https://github.com/mrcangye),
[yangguohao](https://github.com/yangguohao),
[ooooo-create](https://github.com/ooooo-create),
[megemini](https://github.com/megemini),
[DUCH714](https://github.com/DUCH714),
[zlynna](https://github.com/zlynna),
[jjyaoao](https://github.com/jjyaoao),
[jiamingkong](https://github.com/jiamingkong),
[Liyulingyue](https://github.com/Liyulingyue),
Expand Down
6 changes: 5 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,12 @@
<a href="https://github.com/MayYouBeProsperous"><img class="avatar" src="https://avatars.githubusercontent.com/MayYouBeProsperous" alt="avatar" /></a>
<a href="https://github.com/AndPuQing"><img class="avatar" src="https://avatars.githubusercontent.com/AndPuQing" alt="avatar" /></a>
<a href="https://github.com/lknt"><img class="avatar" src="https://avatars.githubusercontent.com/lknt" alt="avatar" /></a>
<a href="https://github.com/yangguohao"><img class="avatar" src="https://avatars.githubusercontent.com/yangguohao" alt="avatar" /></a>
<a href="https://github.com/mrcangye"><img class="avatar" src="https://avatars.githubusercontent.com/mrcangye" alt="avatar" /></a>
<a href="https://github.com/yangguohao"><img class="avatar" src="https://avatars.githubusercontent.com/yangguohao" alt="avatar" /></a>
<a href="https://github.com/ooooo-create"><img class="avatar" src="https://avatars.githubusercontent.com/ooooo-create" alt="avatar" /></a>
<a href="https://github.com/megemini"><img class="avatar" src="https://avatars.githubusercontent.com/megemini" alt="avatar" /></a>
<a href="https://github.com/DUCH714"><img class="avatar" src="https://avatars.githubusercontent.com/DUCH714" alt="avatar" /></a>
<a href="https://github.com/zlynna"><img class="avatar" src="https://avatars.githubusercontent.com/zlynna" alt="avatar" /></a>
<a href="https://github.com/jjyaoao"><img class="avatar" src="https://avatars.githubusercontent.com/jjyaoao" alt="avatar" /></a>
<a href="https://github.com/jiamingkong"><img class="avatar" src="https://avatars.githubusercontent.com/jiamingkong" alt="avatar" /></a>
<a href="https://github.com/Liyulingyue"><img class="avatar" src="https://avatars.githubusercontent.com/Liyulingyue" alt="avatar" /></a>
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/install_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@

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

``` shell
pip install -U paddlesci
```
--8<--
./README.md:pip_install
--8<--

=== "设置 PYTHONPATH"

Expand Down