编译安装python3时make install出错
Tofloor
poster avatar
steve-303
deepin
2020-08-19 23:16
Author
本帖最后由 steve-303 于 2020-8-19 15:17 编辑

今天尝试编译安装python3.8.5,于是到官网下载了源码,之后直到make的一系列操作都很顺利,但是make install的时候出错了,错误代码如下
ERROR: Exception:
Traceback (most recent call last):                                    
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 188, in _main                              
    status = self.run(options, args)                                   
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/cli/req_command.py", line 185, in wrapper                              
    return func(self, options, args)                                   
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 278, in run                                 
    session = self.get_default_session(options)                        
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/cli/req_command.py", line 83, in get_default_session                  
    self._session = self.enter_context(self._build_session(options))   
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/cli/req_command.py", line 93, in _build_session                        
    session = PipSession(                                             
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/network/session.py", line 249, in __init__                             
    self.headers["User-Agent"] = user_agent()                          
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_internal/network/session.py", line 132, in user_agent                           
    zip(["name", "version", "id"], distro.linux_distribution()),      
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_vendor/distro.py", line 125, in linux_distribution                              
    return _distro.linux_distribution(full_distribution_name)         
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_vendor/distro.py", line 681, in linux_distribution                              
    self.version(),                                                   
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_vendor/distro.py", line 741, in version                                         
    self.lsb_release_attr('release'),                                 
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_vendor/distro.py", line 903, in lsb_release_attr                                
    return self._lsb_release_info.get(attribute, '')                  
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_vendor/distro.py", line 556, in __get__                                         
    ret = obj.__dict__[self._fname] = self._f(obj)                     
  File "/tmp/tmp8jsfiwll/pip-20.1.1-py2.py3-none-any.whl/pip/_vendor/distro.py", line 1014, in _lsb_release_info                              
    stdout = subprocess.check_output(cmd, stderr=devnull)              
  File "/usr/local/python3/Python-3.8.5/Lib/subprocess.py", line 411, in check_output                                                         
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,   
  File "/usr/local/python3/Python-3.8.5/Lib/subprocess.py", line 512, in run                                                                  
    raise CalledProcessError(retcode, process.args,                    
subprocess.CalledProcessError: Command '('lsb_release', '-a')' died with .           

网上找到的方法是要yum install libffi-devel ,不过那是给红帽系用的
有大佬知道怎么解决的吗,谢谢

Reply Favorite View the author
All Replies
avatar
Feng Yu
deepin
2020-08-19 23:38
#1
apt search一把就知道对应的包名了。另外python不建议自己编译,用conda吧
Reply View the author
avatar
joo
deepin
2020-08-20 01:47
#2
Linux太多的软件依赖Python,牵一发而动全省,搞不好,整个debian系统半数软件都运行不了,连debian这样发行版官方都不敢随便升级Python,老实等debian 11官方维护Python3.8或3.9吧,至少debian有长达2年的测试。
Reply View the author
avatar
juteman
deepin
2020-08-20 01:57
#3
sudo apt install libffi-dev
Reply View the author
avatar
juteman
deepin
2020-08-20 01:58
#4
一般 deb 的 library 结尾用dev
rpm 用 devel
Reply View the author
avatar
xmu714
deepin
2020-08-20 02:23
#5
anaconda它不香吗,干嘛非得要自己编译
Reply View the author