ld: file not found: python.exe报错解决

简介: ld: file not found: python.exe报错解决

环境


Mac OS 10.11.6
pyenv 1.2.8
Python 2.7.5

问题

$ pip install lxml==3.6.4
Failed to build lxml
ld: file not found: python.exe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for lxml

解决:

2.7.5 是对应的版本号


$ export p=/Users/$(whoami)/.pyenv/versions/2.7.5
$ sed -i -e "s~-bundle_loader python.exe~-bundle_loader ${p}/bin/python2.7~g" "$p/lib/python2.7/_sysconfigdata.py"

再次安装成功了


$ pip install lxml==3.6.4
Successfully built lxml
Installing collected packages: lxml
  Found existing installation: lxml 4.3.3
    Uninstalling lxml-4.3.3:
      Successfully uninstalled lxml-4.3.3
Successfully installed lxml-3.6.4

安装普通包没问题,比如requests ,而需要编译的包,比如lxml就报错

相关文章
|
3月前
|
Web App开发 Python
Python使用selenium的Chrome下载文件报错解决
Python使用selenium的Chrome下载文件报错解决
49 0
|
2月前
|
安全 网络安全 API
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
74 1
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
|
4月前
|
Python
Python Playwright 打包报错 Please run the following command to download new browsers
Python Playwright 打包报错 Please run the following command to download new browsers
83 0
|
11天前
|
Python
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
|
1月前
|
索引 Python
Python程序报错合集
Python程序报错合集
14 0
|
1月前
|
文字识别 Python
python代码运行报错:No module named 'aliyunsdkcore'
用python调用阿里云图片OCR识别,使用的是阿里云官方给的传本地图片文件进行检测的代码,运行报错:No module named 'aliyunsdkcore'。在pycharm python软件包和终端里安装aliyunsdkcore这个模块都失败了。
|
3月前
|
编解码 Python Windows
Python写入文件报错‘gbk’ codec can’t encode character的解决办法
Python写入文件报错‘gbk’ codec can’t encode character的解决办法
69 2
|
3月前
|
Python
python中 open() 和 File()
在Python中,open()是内置函数,而File是类。它们的区别和理解如下: 1. open()函数:open()函数用于打开一个文件,并返回一个文件对象。它有以下几个参数:
33 2
|
3月前
|
自然语言处理 开发者 Windows
Win11环境Mecab日语分词和词性分析以及动态库DLL not found问题(Python3.10)
日语因为存在假名,会导致翻译软件进行翻译时机翻味道过重的问题,比如積ん読(つんどく)这个词,大多数软件会翻译成:堆积的读,但其实是明明买了书却不读,光放着的意思。有时候也需要单独查句子中的单词释义来理解句子的意思,但一看下去全是假名,无法像中文或者英文那样进行简单的分词操作。 本次我们基于Python3.10的三方库Mecab来对日语进行分词和词性分析。
Win11环境Mecab日语分词和词性分析以及动态库DLL not found问题(Python3.10)
|
4月前
|
Python
NPM【问题 01】npm i node-sass@4.14.1报错not found: python2及Cannot download问题处理
NPM【问题 01】npm i node-sass@4.14.1报错not found: python2及Cannot download问题处理
80 0