[PaddlePaddle/Paddle]飞腾d2000编译安装paddlepaddle,cmake报错

2024-03-22 227 views
9
问题描述 Issue Description

cmake .. -DPY_VERSION=3 -DPYTHON_EXECUTABLE=which python3 -DWITH_ARM=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_XBYAK=OFF报错: Could NOT find PY_pip (missing: PY_PIP) CMake Error at cmake/python_module.cmake:29(message): python module pip is not found

版本&环境信息 Version & Environment Information

/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "summary_env.py", line 144, in main() File "summary_env.py", line 139, in main get_driver_info() File "summary_env.py", line 126, in get_driver_info driver_ver.split('Driver Version:')[1].strip().split(' ')[0] IndexError: list index out of range

回答

4

根据错误提示,是您的环境中没有安装 pip

Could NOT find PY_pip (missing: PY_PIP)
CMake Error at cmake/python_module.cmake:29(message):
python module pip is not found
8

对的,运行cmake之前,安装好pip就行了。

1

有pip,而且是pip3 pip -V pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) pip3 -V pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

5

我的环境里有pip

2

-DPYTHON_EXECUTABLE=which python3 这个命令找到的python3是上述python吗?是不是有虚拟环境之类的其他python bin

7

which python3 /usr/bin/python3 是正确的路径

0

有pip,而且是pip3 pip -V pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) pip3 -V pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

1

加下这个吧 cmake .. -DPY_PIP=path of your pip installed

3

cmake . -DPY_VERSION=3.8 -DPYTHON_EXECUTABLE='which python3' -DWITH_ARM=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_XBYAK=OFF -DPY_PIP=/usr/lib/pytho3/dist-packages/pip -DPY_NUMPY=/usr/local/lib/python3.8/dist-packages/numpy -DPY_WHEEL=/usr/local/lib/python3.8/dist-packages/wheel -DPY_GOOGLE.PROTOBUF=/usr/local/lib/python3.8/dist-packages/protobuf -DPYTHON_NUMPY_INCLUDE_DIR=/usr/local/lib/python3.8/dist-packages/NumPy -DPROTOBUF_VERSION=4.21.9 加了以后发现每个都要加, -DPROTOBUF_VERSION=4.21.9 这个写法不对吗?为什么还是报Protobuf版本小于3.0.0

4

protobuf按照报错信息,安装符合要求的版本即可。

4

pip install -U 了,版本是3.1.0,但是还是报这个错

9
  1. 报【这个】错是什么呢?可以贴一下吗?
  2. 我看下来,大方向上感觉还是python package哪里没链接上,就是整个package在编译时候找不到。可以尝试export python路径试下
2

请问你最后安装成功了吗