『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 8673|回复: 1

[基础教程] N1 python3.9 pip 安装失败

[复制链接]

1

主题

2

帖子

26

积分

新手上路

Rank: 1

积分
26
金钱
24
HASS币
0
发表于 2021-7-2 22:32:48 | 显示全部楼层 |阅读模式
纯小白,从来没接触过Linux,因为hass提示需要升级到Python3.8,干脆就下载了个Python3.9按照网上教程来安装,但是装完pip始终装不上,用sudo apt install python3-pip 安装后提示安装成功,显示
python3-pip is already the newest version (18.1-5).The following packages were automatically installed and are no longer required:
  apt-file libapt-pkg-perl libexporter-tiny-perl liblist-moreutils-perl
  libregexp-assemble-perl
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 96 not upgraded.
但是如果用pip3 -V 显示
raceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip._internal import main
ModuleNotFoundError: No module named 'pip'

我是怎么都找不到这个pip文件,python3.9安装的时候并没有自动安装pip,然后我手动Python3 setup.py
提示:Traceback (most recent call last):
  File "<frozen zipimport>", line 520, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen zipimport>", line 568, in _get_data
  File "<frozen zipimport>", line 523, in _get_decompress_func
zipimport.ZipImportError: can't decompress data; zlib not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/Python-3.9.6/get-pip.py", line 24312, in <module>
    main()
  File "/root/Python-3.9.6/get-pip.py", line 139, in main
    bootstrap(tmpdir=tmpdir)
  File "/root/Python-3.9.6/get-pip.py", line 115, in bootstrap
    monkeypatch_for_cert(tmpdir)
  File "/root/Python-3.9.6/get-pip.py", line 96, in monkeypatch_for_cert
    from pip._internal.commands.install import InstallCommand
  File "<frozen zipimport>", line 241, in load_module
  File "<frozen zipimport>", line 709, in _get_module_code
  File "<frozen zipimport>", line 570, in _get_data
zipimport.ZipImportError: can't decompress data; zlib not available

实在搞不定了,请教各位高手

硬件N1,系统 Armbian Linux 5.3.0-aml-g12



回复

使用道具 举报

6

主题

743

帖子

5960

积分

论坛元老

Rank: 8Rank: 8

积分
5960
金钱
5212
HASS币
20
发表于 2021-7-4 16:07:32 | 显示全部楼层
再次make install,操心看错误提示,你的这种情况应该是Python3.9安装出错了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-27 08:38 , Processed in 0.080427 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表