paddlehub 安装过程

C:\Users\lin26>pip install paddlehub==1.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

出错:

Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:

————————————————

原因一:是setuptools的版本太低,只不过是它的另一种表现形式,新版本的setuptools有新功能,pip下载的时候会使用最新的下载途径,就会用到这个新功能,然而如果你的版本较低,就没有这个功能,然后就会报错;
AttributeError: module ‘setuptools.build____meta’ has no attribute ‘__legacy__’,你的电脑可能报的不一定是’__legacy__’,但是原因还是一样的,要更新setuptools,使用指令:
pip install --upgrade setuptools

原因二(by lin ):

因为我用的是python2.7,opencv-python的最新版本已经不开放对python2.7的支持,所以想要python2.7想要正确安装opencv-python只能下载低版本。
解决办法:python -m pip install opencv-python==4.2.0.32

再运行:C:\Users\lin26>pip install paddlehub==1.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

 出错:Building wheel for sentencepiece (setup.py) ... error

ERROR: Command errored out with exit status 1:

error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

所以,还是用whl文件安装吧
----------------------------------------


————————————————

如果还是不行

先安装wheel后再安装pandas试试
pip install wheel -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

posted @ 2021-09-14 23:18  也许明天  阅读(2619)  评论(0编辑  收藏  举报