解决麒麟系统arm环境无法安装pyinstaller的错误:Checking for library z : not found

错误信息如下:

[root@ecs-6af3 ~]# pip3 install pyinstaller==4.0
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pyinstaller==4.0
  Downloading https://mirrors.aliyun.com/pypi/packages/82/96/21ba3619647bac2b34b4996b2dbbea8e74a703767ce24192899d9153c058/pyinstaller-4.0.tar.gz (3.5MB)
    100% |████████████████████████████████| 3.5MB 23.7MB/s 
  Installing build dependencies ... done
Requirement already satisfied: setuptools in /usr/lib/python3.7/site-packages (from pyinstaller==4.0) (40.4.3)
Collecting altgraph (from pyinstaller==4.0)
  Downloading https://mirrors.aliyun.com/pypi/packages/84/3f/1a5c9bef54cac9bf41edd6f4aaf61cd52ed578e10ccc607e0278012cb4a5/altgraph-0.17.2-py2.py3-none-any.whl
Collecting pyinstaller-hooks-contrib>=2020.6 (from pyinstaller==4.0)
  Downloading https://mirrors.aliyun.com/pypi/packages/fe/73/1b586d9fa51b074ab198638dae6db6ba5fa63d8225bd380c612bda01c5ef/pyinstaller_hooks_contrib-2021.3-py2.py3-none-any.whl (200kB)
    100% |████████████████████████████████| 204kB 44.9MB/s 
Installing collected packages: altgraph, pyinstaller-hooks-contrib, pyinstaller
  Running setup.py install for pyinstaller ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-nbtg27co/pyinstaller/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-record-xk5mz8fi/install-record.txt --single-version-externally-managed --compile:
    /tmp/pip-build-env-u1lo9p1r/lib/python3.7/site-packages/setuptools/__init__.py:151: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
      SetuptoolsDeprecationWarning,
    running install
    /tmp/pip-build-env-u1lo9p1r/lib/python3.7/site-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_bootloader
    No precompiled bootloader found. Trying to compile it for you ...
    Setting top to                           : /tmp/pip-install-nbtg27co/pyinstaller/bootloader
    Setting out to                           : /tmp/pip-install-nbtg27co/pyinstaller/bootloader/build
    Python Version                           : 3.7.4 (default, Mar 24 2020, 19:20:18) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]
    Checking for 'gcc' (C compiler)          : /usr/bin/gcc
    Checking size of pointer                 : 8
    Platform                                 : Linux-64bit detected based on compiler
    Checking for compiler flags -m64         : no
    Checking for linker flags -m64           : no
    Checking for library dl                  : yes
    Checking for library m                   : yes
    Checking for library z                   : not found
    The configuration failed
    (complete log in /tmp/pip-install-nbtg27co/pyinstaller/bootloader/build/config.log)
    ERROR: Failed compiling the bootloader. Please compile manually and rerun setup.py
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-nbtg27co/pyinstaller/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-record-xk5mz8fi/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-nbtg27co/pyinstaller/

解决方法:

 yum install zlib-devel

验证

[root@ecs-6af3 ~]# pip3 install pyinstaller==4.0
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pyinstaller==4.0
  Using cached https://mirrors.aliyun.com/pypi/packages/82/96/21ba3619647bac2b34b4996b2dbbea8e74a703767ce24192899d9153c058/pyinstaller-4.0.tar.gz
  Installing build dependencies ... done
Requirement already satisfied: setuptools in /usr/lib/python3.7/site-packages (from pyinstaller==4.0) (40.4.3)
Requirement already satisfied: altgraph in /usr/local/lib/python3.7/site-packages (from pyinstaller==4.0) (0.17.2)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in /usr/local/lib/python3.7/site-packages (from pyinstaller==4.0) (2021.3)
Installing collected packages: pyinstaller
  Running setup.py install for pyinstaller ... done
Successfully installed pyinstaller-4.0

解决无法安装pandas

pip3 install python-dev
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坐公交也用券

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值