Skip to content
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

新版MacbookAir M1芯片无法安装paddlepaddle怎么办? #32377

Closed
TouyaAkira opened this issue Apr 20, 2021 · 22 comments
Closed

新版MacbookAir M1芯片无法安装paddlepaddle怎么办? #32377

TouyaAkira opened this issue Apr 20, 2021 · 22 comments
Assignees
Labels
status/close 已关闭

Comments

@TouyaAkira
Copy link

苹果M1芯片的macbook air,实际上GPU还是很强的,tensorflow已经做了适配,paddle会跟进吗?
pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple
ERROR: Could not find a version that satisfies the requirement paddlepaddle
ERROR: No matching distribution found for paddlepaddle

为使您的问题得到快速解决,在建立Issue前,请您先通过如下方式搜索是否有相似问题:【搜索issue关键字】【使用labels筛选】【官方文档】

建立issue时,为快速解决问题,请您根据使用情况给出如下信息:

  • 标题:请包含关键词“安装错误”/“编译错误”,例如“Mac编译错误”
  • 版本、环境信息:
       1)PaddlePaddle版本:请提供您的PaddlePaddle版本号(如1.1)或CommitID
       2)CPU:请提供CPU型号,MKL/OpenBlas/MKLDNN/等数学库的使用情况
       3)GPU:请提供GPU型号,CUDA和CUDNN版本号
       4)系统环境:请说明系统类型、版本(如Mac OS 10.14)、Python版本
    注:您可以通过执行summary_env.py获取以上信息。
  • 安装方式信息:
    1)pip安装/docker安装
    2)本地编译:请提供cmake命令,编译命令
    3)docker编译:请提供docker镜像,编译命令           
     特殊环境请注明:如离线安装等
  • 复现信息:如为报错,请给出复现环境、复现步骤
  • 问题描述:请详细描述您的问题,同步贴出报错信息、日志/代码关键片段

Thank you for contributing to PaddlePaddle.
Before submitting the issue, you could search issue in Github in case that there was a similar issue submitted or resolved before.
If there is no solution,please make sure that this is an installation issue including the following details:
System information
-PaddlePaddle version (eg.1.1)or CommitID
-CPU: including CPUMKL/OpenBlas/MKLDNN version
-GPU: including CUDA/CUDNN version
-OS Platform (eg. Mac OS 10.14)
-Python version

  • Install method: pip install/install with docker/build from source(without docker)/build within docker
  • Other special cases that you think may be related to this problem, eg. offline install, special internet condition
    Note: You can get most of the information by running summary_env.py.  

To Reproduce
Steps to reproduce the behavior
Describe your current behavior
Code to reproduce the issue
Other info / logs

@paddle-bot-old
Copy link

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@Shixiaowei02
Copy link
Contributor

我们测试是可以pip install安装的,请检查pip源是否可用;如果还有问题,请提供给我们具体不能安装的wheel包链接,谢谢

@TouyaAkira
Copy link
Author

conda activate py38
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple
ERROR: Could not find a version that satisfies the requirement paddlepaddle
ERROR: No matching distribution found for paddlepaddle

用pip安装,用百度自己的源,直接报错,怎么破?

@TouyaAkira
Copy link
Author

安装了mini-conda,在python3.8.8下运行pip install,直接找不到合适的版本

@xxxpsyduck
Copy link

Try docker?

@dingjiaweiww
Copy link
Contributor

dingjiaweiww commented May 27, 2021

现在解决了吗,我这里测试pro M1芯片是可以安装的,尝试下先把旧版本paddle 卸载掉:sudo pip3 uninstall paddlepaddle,再安装最新版本paddle(2.1): python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple,注意2.1 版本的paddle 不再支持python27 和python35

@TouyaAkira
Copy link
Author

现在解决了吗,我这里测试pro M1芯片是可以安装的,尝试下先把旧版本paddle 卸载掉:sudo pip3 uninstall paddlepaddle,再安装最新版本paddle(2.1): python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple,注意2.1 版本的paddle 不再支持python27 和python35

并没有解决,我是在M1芯片的macbook air上安装了mini-forge的conda,然后创建python3.8的环境,在该环境下想安装paddlepaddle,运行命令:
pip3 install paddlepaddle -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple
ERROR: Could not find a version that satisfies the requirement paddlepaddle (from versions: none)
ERROR: No matching distribution found for paddlepaddle

直接就报错了,根本没有安装成功过,还有什么注意点?

@TouyaAkira
Copy link
Author

现在解决了吗,我这里测试pro M1芯片是可以安装的,尝试下先把旧版本paddle 卸载掉:sudo pip3 uninstall paddlepaddle,再安装最新版本paddle(2.1): python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple,注意2.1 版本的paddle 不再支持python27 和python35

paddlepaddle官方安装文档中的pip安装部分写着:
需要确认Python和pip是64bit,并且处理器架构是x86_64(或称作x64、Intel 64、AMD64)架构,目前PaddlePaddle不支持arm64架构。下面的第一行输出的是”64bit”,第二行输出的是”x86_64”、”x64”或”AMD64”即可:

python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
64bit
arm64

我的M1的macbook air是arm64架构,看文档是不支持的,你们是怎么做到能装的?

@dingjiaweiww
Copy link
Contributor

M1 都是arm64架构的,试下用mac 自带的python环境安装paddlepaddle,看看这样能成功吗

@TouyaAkira
Copy link
Author

一样的报错信息,找不到合适的包.

@dingjiaweiww
Copy link
Contributor

你可以联系一下这个邮箱,我把安装包发给你:[email protected]

@TouyaAkira
Copy link
Author

发信给这个邮箱直接退信了,不在权限范围内...
我的邮箱是[email protected],你直接发到我的邮箱好嘛?

@DDDivano
Copy link
Contributor

image
image

check一下本地的python环境,pip源? 我这边安装是可以的

@hustliweizeng
Copy link

image
image

check一下本地的python环境,pip源? 我这边安装是可以的

你芯片是arm64的,官网安装文档也说明不支持了,你贴的图片下载的版本是x86_64架构的,请问你这2个图片是一个电脑么。。

@DDDivano
Copy link
Contributor

DDDivano commented Jul 7, 2021

image
image
check一下本地的python环境,pip源? 我这边安装是可以的

你芯片是arm64的,官网安装文档也说明不支持了,你贴的图片下载的版本是x86_64架构的,请问你这2个图片是一个电脑么。。

M1 支持运行x86的程序

@Adam-lxd
Copy link

Adam-lxd commented Aug 22, 2021

同样的问题。我似乎解决了。
我使用miniforge装的python,好像miniforge的python是不支持rosetta2转译的,可以强制设置为rosetta2的python去安装。方法参考issue

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python // create a new environment called pd_rosetta with intel packages.
conda activate pd_rosetta
python -c "import platform;print(platform.machine())"  // should be ‘x86_64’ not ‘arm64’
conda env config vars set CONDA_SUBDIR=osx-64 // # make sure that conda commands in this environment use intel packages
conda deactivate
conda activate pd_rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
// enter python to check install 
python
import paddle
paddle.utils.run_check()

output

Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W0822 09:52:02.317059 8523264 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

@augiot
Copy link

augiot commented Sep 4, 2021

同样的问题。我似乎解决了。
我使用miniforge装的python,好像miniforge的python是不支持rosetta2转译的,可以强制设置为rosetta2转移的python去安装。方法参考issue

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python // create a new environment called pd_rosetta with intel packages.
conda activate pd_rosetta
python -c "import platform;print(platform.machine())"  // should be ‘x86_64’ not ‘arm64’
conda env config vars set CONDA_SUBDIR=osx-64 // # make sure that conda commands in this environment use intel packages
conda deactivate
conda activate pd_rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
// enter python to check install 
python
import paddle
paddle.utils.run_check()

out put

Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W0822 09:52:02.317059 8523264 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

厉害~

@TouyaAkira
Copy link
Author

同样的问题。我似乎解决了。
我使用miniforge装的python,好像miniforge的python是不支持rosetta2转译的,可以强制设置为rosetta2转移的python去安装。方法参考issue

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python // create a new environment called pd_rosetta with intel packages.
conda activate pd_rosetta
python -c "import platform;print(platform.machine())"  // should be ‘x86_64’ not ‘arm64’
conda env config vars set CONDA_SUBDIR=osx-64 // # make sure that conda commands in this environment use intel packages
conda deactivate
conda activate pd_rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
// enter python to check install 
python
import paddle
paddle.utils.run_check()

out put

Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W0822 09:52:02.317059 8523264 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

谢谢!!终于有人解决了我的问题,确实是安装了miniforge的conda,给你点赞!

@wa008
Copy link

wa008 commented Mar 20, 2022

同样的问题。我似乎解决了。 我使用miniforge装的python,好像miniforge的python是不支持rosetta2转译的,可以强制设置为rosetta2的python去安装。方法参考issue

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python // create a new environment called pd_rosetta with intel packages.
conda activate pd_rosetta
python -c "import platform;print(platform.machine())"  // should be ‘x86_64’ not ‘arm64’
conda env config vars set CONDA_SUBDIR=osx-64 // # make sure that conda commands in this environment use intel packages
conda deactivate
conda activate pd_rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
// enter python to check install 
python
import paddle
paddle.utils.run_check()

output

Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W0822 09:52:02.317059 8523264 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

非常感谢~~
网站 "https://mirror.baidu.com/pypi/simple" 挂掉了吗? Mac mini安装过程在这一步报错 python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

@Adam-lxd
Copy link

同样的问题。我似乎解决了。 我使用miniforge装的python,好像miniforge的python是不支持rosetta2转译的,可以强制设置为rosetta2的python去安装。方法参考issue

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python // create a new environment called pd_rosetta with intel packages.
conda activate pd_rosetta
python -c "import platform;print(platform.machine())"  // should be ‘x86_64’ not ‘arm64’
conda env config vars set CONDA_SUBDIR=osx-64 // # make sure that conda commands in this environment use intel packages
conda deactivate
conda activate pd_rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
// enter python to check install 
python
import paddle
paddle.utils.run_check()

output

Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W0822 09:52:02.317059 8523264 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

非常感谢~~ 网站 "https://mirror.baidu.com/pypi/simple" 挂掉了吗? Mac mini安装过程在这一步报错 python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

我尝试打开了一下百度镜像的网站,确实返回错误信息。可以尝试更换清华的源:https://pypi.tuna.tsinghua.edu.cn/simple

@SigureMo
Copy link
Member

同样的问题。我似乎解决了。 我使用miniforge装的python,好像miniforge的python是不支持rosetta2转译的,可以强制设置为rosetta2的python去安装。方法参考issue

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python // create a new environment called pd_rosetta with intel packages.
conda activate pd_rosetta
python -c "import platform;print(platform.machine())"  // should be ‘x86_64’ not ‘arm64’
conda env config vars set CONDA_SUBDIR=osx-64 // # make sure that conda commands in this environment use intel packages
conda deactivate
conda activate pd_rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
// enter python to check install 
python
import paddle
paddle.utils.run_check()

output

Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W0822 09:52:02.317059 8523264 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

非常感谢~~ 网站 "mirror.baidu.com/pypi/simple" 挂掉了吗? Mac mini安装过程在这一步报错 python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

应该没挂,主要是 conda 创建 python 的默认版本从 3.9 变成了 3.10,而 paddle 还不支持 python3.10,所以就会报类似「找不到」的错啦~

可以通过在创建环境时指定具体版本号解决,比如指定为 3.9

CONDA_SUBDIR=osx-64 conda create -n pd_rosetta python=3.9

我当时也有很长一段时间以为挂掉了,后来才发现默认创建的环境从 3.9 变成了 3.10 了 😂

@paddle-bot paddle-bot bot added the status/close 已关闭 label Jan 11, 2023
@wangjitong468
Copy link

受益!!!!感谢小伙伴们!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/close 已关闭
Projects
None yet
Development

No branches or pull requests