亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

配置:錯誤:Python.h 在 Ubuntu 18 中存在時找不到

配置:錯誤:Python.h 在 Ubuntu 18 中存在時找不到

慕仙森 2023-05-16 14:50:44
我正在嘗試運行一個./configure --with-python文件(我可以附加它,但它很長),但出現以下錯誤:checking for gtest-config... noFile "<string>", line 1import distutils.sysconfig; bl = distutils.sysconfig.get_config_var('BLDLIBRARY'); print bl if bl   else '-lpython2.7'                                                                                              ^SyntaxError: invalid syntaxFile "<string>", line 1import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY')                                              ^SyntaxError: invalid syntaxchecking Python.h usability... nochecking Python.h presence... nochecking for Python.h... noconfigure: error: Python.h not found. Please install the devel package.下一步,我運行:locate Python.h這給了我:/usr/include/python2.7/Python.h/usr/include/python3.6m/Python.h/usr/include/python3.7m/Python.h下一步,我運行其中的每一個:./configure --with-python=/usr/bin/python2.7./configure --with-python=/usr/bin/python3.6m./configure --with-python=/usr/include/python3.6m/Python.h沒有運氣。關于錯誤可能出在哪里的任何指示?非常感謝!
查看完整描述

1 回答

?
幕布斯7119047

TA貢獻1794條經驗 獲得超8個贊

你不見了CFLAGS

./configure --with-python=/usr/bin/python2.7 CFLAGS="-I/usr/include/python2.7/


查看完整回答
反對 回復 2023-05-16
  • 1 回答
  • 0 關注
  • 262 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號