pip安装报错Could NOT find Arrow (missing: Arrow_DIR) 、 No package ‘arrow‘ found

在ubuntu pip安装 datasets matplotlib pyarrow等包时 可能遇到如下报错:

  -- Found Python lib /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.so
  -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
  -- Could NOT find Arrow (missing: Arrow_DIR)
  -- Checking for module 'arrow'
  --   No package 'arrow' found
  CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
    Could NOT find Arrow (missing: ARROW_INCLUDE_DIR ARROW_LIB_DIR
    ARROW_FULL_SO_VERSION ARROW_SO_VERSION)
  Call Stack (most recent call first):
    /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
    cmake_modules/FindArrow.cmake:450 (find_package_handle_standard_args)
    cmake_modules/FindArrowPython.cmake:46 (find_package)
    CMakeLists.txt:229 (find_package)


  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-build-y_r12kuh/pyarrow/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log".
  error: command 'cmake' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyarrow
  Running setup.py clean for pyarrow
Failed to build pyarrow
Installing collected packages: pyarrow
  Running setup.py install for pyarrow ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-y_r12kuh/pyarrow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ffo8pwle-record/install-record.txt --single-version-externally-managed --compile:
    /usr/local/lib/python3.6/dist-packages/setuptools/__init__.py:151: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
      SetuptoolsDeprecationWarning,
    running install
    /usr/local/lib/python3.6/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    running build
    running build_py
    creating build
 

网上搜到的其他解决方案都没解决我的问题,最终本人用的:

python -m pip install --upgrade pip

另外, 拿到一个新linux环境,最常安装和修改的东西  可以记下来,下次使用新环境按checklist操作 可以快速避坑。新增和修改配置文件 可以echo后重定向或sed之类。  一般拿到新环境后, centos需要安装的东西 包括但不限于如下; 如果新安装python版本,安装后需要更新的其他工具(例如setuptools, pip)和源的修改 都可以记下来依次执行,有时候忘了更新这些,后面可能要定位奇怪的安装问题,这样的定位有点浪费时间,可以避免的。 本人平时记录了centos的,ubuntu的没记,这不,忘记更新pip,ubuntu上就踩坑了(将来多装几次ubuntu再发出来)

yum -y update
yum -y install gcc
yum -y install zlib zlib-devel
yum -y install bzip2 bzip2-devel
yum -y install ncurses ncurses-devel
yum -y install readline readline-devel
yum -y install openssl openssl-devel
yum -y install openssl-static
yum -y install xz lzma xz-devel
yum -y install sqlite sqlite-devel
yum -y install gdbm gdbm-devel
yum -y install tk tk-devel
yum -y install libffi libffi-devel

yum -y install python-devel
yum -y install libevent-devel
yum -y install gcc gcc-c++ 

安装python3后,除了常用的库 还有:

pip3 install --upgrade pip
pip3 install --upgrade setuptools
pip3 install setuptools_scm

当然 使用标准化后的docker 也是OK的。不过基础环境  还是要准备一下。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
这个错误信息表示找不到protobuf(Protocol Buffers)库,具体缺失的部分有protobuf_libraries和protobuf_include_dir。 解决这个问题的方法如下: 1. 确认是否已经安装了protobuf库。可以通过在命令行运行"pip list"或"conda list"查看已安装的库。如果未安装,可以使用包管理工具如pip或conda进行安装(例如,"pip install protobuf")。 2. 如果已经安装了protobuf库,但仍然报错,可能是由于缺少protobuf_libraries和protobuf_include_dir变量的路径。可以在系统的环境变量中设置这两个变量。protobuf_libraries变量应指向protobuf库的二进制文件路径,而protobuf_include_dir变量应指向protobuf库的头文件路径。 3. 如果已经设置了这两个变量,但仍然出现错误,那么可能是因为这些路径设置不正确或者protobuf库的安装位置与预期不符。可以通过重新安装protobuf库,并确保设置路径正确来解决问题。 4. 如果仍然无法解决问题,可以尝试手动下载并安装protobuf库。在protobuf的官方GitHub页面上可以找到最新的发布版本,并提供了安装步骤。按照步骤下载并安装protobuf库,然后再次检查路径设置是否正确。 总之,缺少protobuf(protobuf_libraries和protobuf_include_dir)错误通常表示系统无法找到protobuf库。通过确认库是否已安装、设置正确的路径和重新安装protobuf库等方法,可以解决这个问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值