Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
127e9f4c
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
127e9f4c
编写于
6月 20, 2023
作者:
Z
zqw_1997
提交者:
GitHub
6月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support python3.11 in Darwin (#54739)
* add Darwin py3.11 * fix syntax
上级
ad80fbfe
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
52 addition
and
0 deletion
+52
-0
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+52
-0
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
127e9f4c
...
...
@@ -126,6 +126,18 @@ function cmake_base() {
else
exit
1
fi
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
if
[
-d
"/Library/Frameworks/Python.framework/Versions/3.11"
]
;
then
export
LD_LIBRARY_PATH
=
/Library/Frameworks/Python.framework/Versions/3.11/lib/
export
DYLD_LIBRARY_PATH
=
${
DYLD_LIBRARY_PATH
}
:/Library/Frameworks/Python.framework/Versions/3.11/lib/
export
PATH
=
/Library/Frameworks/Python.framework/Versions/3.11/bin/:
${
PATH
}
PYTHON_FLAGS
=
"-DPYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3
-DPYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/
-DPYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib"
pip3.11
install
--user
-r
${
PADDLE_ROOT
}
/python/requirements.txt
else
exit
1
fi
fi
else
if
[
"
$1
"
!=
""
]
;
then
...
...
@@ -639,6 +651,8 @@ EOF
pip3.9 uninstall
-y
paddlepaddle
elif
[
"
$1
"
==
"cp310-cp310"
]
;
then
pip3.10 uninstall
-y
paddlepaddle
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
pip3.11 uninstall
-y
paddlepaddle
fi
set
-ex
...
...
@@ -654,6 +668,9 @@ EOF
elif
[
"
$1
"
==
"cp310-cp310"
]
;
then
pip3.10
install
--user
${
PADDLE_ROOT
}
/dist/
*
.whl
pip3.10
install
--user
hypothesis
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
pip3.11
install
--user
${
PADDLE_ROOT
}
/dist/
*
.whl
pip3.11
install
--user
hypothesis
fi
tmpfile_rand
=
`
date
+%s%N
`
tmpfile
=
$tmp_dir
/
$tmpfile_rand
...
...
@@ -3376,6 +3393,19 @@ function run_setup(){
else
exit
1
fi
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
if
[
-d
"/Library/Frameworks/Python.framework/Versions/3.11"
]
;
then
export
LD_LIBRARY_PATH
=
/Library/Frameworks/Python.framework/Versions/3.11/lib/
export
DYLD_LIBRARY_PATH
=
${
DYLD_LIBRARY_PATH
}
:/Library/Frameworks/Python.framework/Versions/3.11/lib/
export
PATH
=
/Library/Frameworks/Python.framework/Versions/3.11/bin/:
${
PATH
}
#after changing "PYTHON_LIBRARY:FILEPATH" to "PYTHON_LIBRARY" ,we can use export
export
PYTHON_EXECUTABLE
=
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3
export
PYTHON_INCLUDE_DIR
=
/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/
export
PYTHON_LIBRARY
=
/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib
pip3.11
install
--user
-r
${
PADDLE_ROOT
}
/python/requirements.txt
else
exit
1
fi
fi
else
if
[
"
$1
"
!=
""
]
;
then
...
...
@@ -3631,6 +3661,20 @@ function run_setup_mac(){
else
exit
1
fi
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
if
[
-d
"/Library/Frameworks/Python.framework/Versions/3.11"
]
;
then
export
LD_LIBRARY_PATH
=
/Library/Frameworks/Python.framework/Versions/3.11/lib/
export
DYLD_LIBRARY_PATH
=
${
DYLD_LIBRARY_PATH
}
:/Library/Frameworks/Python.framework/Versions/3.11/lib/
export
DYLD_LIBRARY_PATH
=
${
DYLD_LIBRARY_PATH
}
:
${
PADDLE_ROOT
}
/build/third_party/install/lapack/lib
export
PATH
=
/Library/Frameworks/Python.framework/Versions/3.11/bin/:
${
PATH
}
#after changing "PYTHON_LIBRARY:FILEPATH" to "PYTHON_LIBRARY" ,we can use export
export
PYTHON_EXECUTABLE
=
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3
export
PYTHON_INCLUDE_DIR
=
/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/
export
PYTHON_LIBRARY
=
/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib
pip3.11
install
--user
-r
${
PADDLE_ROOT
}
/python/requirements.txt
else
exit
1
fi
fi
else
if
[
"
$1
"
!=
""
]
;
then
...
...
@@ -3667,6 +3711,14 @@ function run_setup_mac(){
export
PYTHON_INCLUDE_DIR
=
/opt/_internal/cpython-3.10.0/include/python3.10
export
PYTHON_LIBRARIES
=
/opt/_internal/cpython-3.10.0/lib/libpython3.so
pip3.10
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/_internal/cpython-3.11.0/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/_internal/cpython-3.11.0/bin/:
${
PATH
}
#after changing "PYTHON_LIBRARY:FILEPATH" to "PYTHON_LIBRARY" ,we can use export
export
PYTHON_EXECUTABLE
=
/opt/_internal/cpython-3.11.0/bin/python3.11
export
PYTHON_INCLUDE_DIR
=
/opt/_internal/cpython-3.11.0/include/python3.11
export
PYTHON_LIBRARIES
=
/opt/_internal/cpython-3.11.0/lib/libpython3.so
pip3.11
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"conda-python3.7"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/conda/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/conda/bin/:
${
PATH
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录