-
Notifications
You must be signed in to change notification settings - Fork 750
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
renew the install doc for V1.0 #110
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
db2a990
renew the install doc for V1.0
JiabinYang ed528f1
refine doc
JiabinYang 80a415f
Merge branch 'develop' of https://github.com/PaddlePaddle/FluidDoc in…
JiabinYang 45fd012
refine MAC_compile with user installed openblas
JiabinYang 986de04
fix python3 related issue according to https://github.com/PaddlePaddl…
JiabinYang 31a2b83
Merge branch 'develop' of https://github.com/PaddlePaddle/FluidDoc in…
JiabinYang 00a3163
refine python3 LD_LIBRARY and DYLD_LIBRARY set
JiabinYang b4fe292
Merge branch 'develop' of https://github.com/PaddlePaddle/FluidDoc in…
JiabinYang 4a0f14e
fix FAQ
JiabinYang 9250d34
refine macos compile and install on python settings
JiabinYang fb9a085
refine mac compile command
JiabinYang 8d093df
fix comment related format problem
JiabinYang 4505c0b
fix FAQ format problem
JiabinYang 1480bef
add mac compile on 10.14
JiabinYang 090bb5f
remove py3 compile on mac 10.14
JiabinYang a4ece0e
refine
JiabinYang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
*** | ||
<a name="FAQ"></a> | ||
# **FAQ** | ||
- CentOS6下如何编译python2.7为共享库? | ||
|
||
> 使用以下指令: | ||
|
||
./configure --prefix=/usr/local/python2.7 --enable-shared | ||
make && make install | ||
|
||
<!--TODO please add more F&Q parts here--> | ||
|
||
- Ubuntu18.04下libidn11找不到? | ||
|
||
> 使用以下指令: | ||
|
||
apt install libidn11 | ||
|
||
- Ubuntu编译时出现大量的代码段不能识别? | ||
|
||
> 这可能是由于cmake版本不匹配造成的,请在gcc的安装目录下使用以下指令: | ||
|
||
apt install gcc-4.8 g++-4.8 | ||
cp gcc gcc.bak | ||
cp g++ g++.bak | ||
rm gcc | ||
rm g++ | ||
ln -s gcc-4.8 gcc | ||
ln -s g++-4.8 g++ | ||
|
||
|
||
|
||
|
||
- 遇到paddlepaddle*.whl is not a supported wheel on this platform? | ||
|
||
> 出现这个问题的主要原因是,没有找到和当前系统匹配的paddlepaddle安装包。 请检查Python版本是否为2.7系列。另外最新的pip官方源中的安装包默认是manylinux1标准, 需要使用最新的pip (>9.0.0) 才可以安装。您可以执行以下指令更新您的pip: | ||
|
||
pip install --upgrade pip | ||
或者 | ||
|
||
python -c "import pip; print(pip.pep425tags.get_supported())" | ||
|
||
> 如果系统支持的是 linux_x86_64 而安装包是 manylinux1_x86_64 ,需要升级pip版本到最新; 如果系统支持 manylinux1_x86_64 而安装包 (本地)是 linux_x86_64, 可以重命名这个whl包为 manylinux1_x86_64 再安装。 | ||
|
||
- 使用Docker编译出现问题? | ||
|
||
> 请参照GitHub上[Issue12079](https://github.com/PaddlePaddle/Paddle/issues/12079) | ||
|
||
- 什么是 Docker? | ||
|
||
> 如果您没有听说 Docker,可以把它想象为一个类似 virtualenv 的系统,但是虚拟的不仅仅是 Python 的运行环境。 | ||
|
||
- Docker 还是虚拟机? | ||
|
||
> 有人用虚拟机来类比 Docker。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。 | ||
|
||
- 为什么用 Docker? | ||
|
||
> 把工具和配置都安装在一个 Docker image 里可以标准化编译环境。这样如果遇到问题,其他人可以复现问题以便帮助。 | ||
另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。 | ||
|
||
- 可以选择不用Docker吗? | ||
|
||
> 当然可以。大家可以用把开发工具安装进入 Docker image 一样的方式,把这些工具安装到本机。这篇文档介绍基于 Docker 的开发流程,是因为这个流程比其他方法都更简便。 | ||
|
||
- 学习 Docker 有多难? | ||
|
||
> 理解 Docker 并不难,大概花十分钟看一下[这篇文章](https://zhuanlan.zhihu.com/p/19902938)。 | ||
这可以帮您省掉花一小时安装和配置各种开发工具,以及切换机器时需要新安装的辛苦。别忘了 PaddlePaddle 更新可能导致需要新的开发工具。更别提简化问题复现带来的好处了。 | ||
|
||
- 可以用 IDE 吗? | ||
|
||
> 当然可以,因为源码就在本机上。IDE 默认调用 make 之类的程序来编译源码,我们只需要配置 IDE 来调用 Docker 命令编译源码即可。 | ||
很多 PaddlePaddle 开发者使用 Emacs。他们在自己的 `~/.emacs` 配置文件里加两行 | ||
`global-set-key "\C-cc" 'compile` | ||
`setq compile-command "docker run --rm -it -v $(git rev-parse --show-toplevel):/paddle paddle:dev"` | ||
就可以按 `Ctrl-C` 和 `c` 键来启动编译了。 | ||
|
||
- 可以并行编译吗? | ||
|
||
> 是的。我们的 Docker image 运行一个 [Bash 脚本](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/paddle/scripts/paddle_build.sh)。这个脚本调用`make -j$(nproc)` 来启动和 CPU 核一样多的进程来并行编译。 | ||
|
||
- Docker 需要 sudo? | ||
|
||
> 如果用自己的电脑开发,自然也就有管理员权限(sudo)了。如果用公用的电脑开发,需要请管理员安装和配置好 Docker。此外,PaddlePaddle 项目在努力开始支持其他不需要 sudo 的集装箱技术,比如 rkt。 | ||
|
||
- 在 Windows/MacOS 上编译很慢? | ||
|
||
> Docker 在 Windows 和 MacOS 都可以运行。不过实际上是运行在一个 Linux 虚拟机上。可能需要注意给这个虚拟机多分配一些 CPU 和内存,以保证编译高效。具体做法请参考[issue627](https://github.com/PaddlePaddle/Paddle/issues/627)。 | ||
|
||
- 磁盘不够? | ||
|
||
> 本文中的例子里,`docker run` 命令里都用了 `--rm` 参数,这样保证运行结束之后的 containers 不会保留在磁盘上。可以用 `docker ps -a` 命令看到停止后但是没有删除的 containers。`docker build` 命令有时候会产生一些中间结果,是没有名字的 images,也会占用磁盘。可以参考 [这篇文章](https://zaiste.net/posts/removing_docker_containers) 来清理这些内容。 | ||
|
||
- 在DockerToolbox下使用book时`http://localhost:8888/`无法打开? | ||
|
||
> 需要将localhost替换成虚拟机ip,一般需要在浏览器中输入:`http://192.168.99.100:8888/` | ||
|
||
- pip install gpu版本的PaddlePaddle后运行出现SegmentFault如下: | ||
|
||
@ 0x7f6c8d214436 paddle::platform::EnforceNotMet::EnforceNotMet() | ||
|
||
@ 0x7f6c8dfed666 paddle::platform::GetCUDADeviceCount() | ||
|
||
@ 0x7f6c8d2b93b6 paddle::framework::InitDevices() | ||
|
||
|
||
> 出现这个问题原因主要是由于您的显卡驱动低于对应CUDA版本的要求,请保证您的显卡驱动支持所使用的CUDA版本 | ||
|
||
|
||
<a name="MACPRO"></a> | ||
|
||
- MacOS下安装PaddlePaddle后import paddle.fluid出现`Fatal Python error: PyThreadState_Get: no current thread running`错误 | ||
|
||
> - For Python2.7.x: 请使用`find / -name libpython2.7.dylib`找到您当前使用python的`libpython2.7.dylib`路径,并使用`export LD_LIBRARY_PATH=[libpython2.7.dylib所在的目录的上两级目录] && export DYLD_LIBRARY_PATH=[libpython2.7.dylib所在的目录的上两级目录]` | ||
- For Python3.5.x: 请使用`find / -name libpython3.5.dylib`找到您当前使用python的`libpython3.5.dylib`路径,并使用`export LD_LIBRARY_PATH=[libpython3.5.dylib所在的目录的上两级目录] && export DYLD_LIBRARY_PATH=[libpython3.5.dylib所在的目录的上两级目录]` | ||
|
||
<a name="OPENBLAS"></a> | ||
|
||
- MACOS下使用自定义的openblas 详见issue: | ||
|
||
> [ISSUE 13217](https://github.com/PaddlePaddle/Paddle/issues/13721) | ||
|
||
- 已经安装swig但是仍旧出现swig找不到的问题 详见issue: | ||
|
||
> [ISSUE 13759](https://github.com/PaddlePaddle/Paddle/issues/13759) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
========== | ||
安装说明 | ||
========== | ||
本说明将指导您在64位台式机或笔记本电脑上, 使用Python2.7或者Python3.5编译和安装PaddlePaddle,目前PaddlePaddle支持以下环境: | ||
|
||
* *Ubuntu 14.04 /16.04 /18.04* | ||
* *CentOS 7 / 6* | ||
* *MacOS 10.12 / 10.13* | ||
* *Windows7 / 8/ 10(专业版/企业版)* | ||
|
||
请确保您的环境满足以上条件 | ||
|
||
|
||
安装PaddlePaddle | ||
----------------------- | ||
|
||
.. toctree:: | ||
:maxdepth:1 | ||
|
||
install_Ubuntu.md | ||
install_CentOS.md | ||
install_MacOS.md | ||
install_Windows.md | ||
compile/fromsource.rst | ||
|
||
如在安装或编译过程中遇到问题请参见 | ||
----------------------- | ||
|
||
.. toctree:: | ||
:maxdepth:1 | ||
|
||
FAQ.md | ||
Tables.md |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从这个FAQ开始,问题下对应的回答没有缩进:
请尝试修改成如下效果: