PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.6k stars 2.07k forks source link

MacOS安装paddlehub失败 #1232

Open aglaregeek opened 3 years ago

aglaregeek commented 3 years ago

1)未安装PaddleHub和PaddlePaddle 2)系统环境:MacOS 10.13.4,python版本3.9

百度推荐的安装命令 shihuichendeMacBook-Pro:~ paddlechengyuan$ python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple Looking in indexes: https://mirror.baidu.com/pypi/simple ERROR: Could not find a version that satisfies the requirement paddlepaddle ERROR: No matching distribution found for paddlepaddle

换python3 shihuichendeMacBook-Pro:~ paddlechengyuan$ python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple ERROR: Invalid requirement: 'paddlepaddle\xa0-i'

去掉百度源 shihuichendeMacBook-Pro:~ paddlechengyuan$ python3 -m pip install paddlepaddle ERROR: Could not find a version that satisfies the requirement paddlepaddle ERROR: No matching distribution found for paddlepaddle

pip安装 shihuichendeMacBook-Pro:~ paddlechengyuan$ pip install paddlehub Collecting paddlehub Downloading paddlehub-1.8.3-py3-none-any.whl (342 kB) |████████████████████████████████| 342 kB 484 kB/s 。。。 。。。 Collecting idna<3,>=2.5 Downloading idna-2.10-py2.py3-none-any.whl (58 kB) |████████████████████████████████| 58 kB 96 kB/s Using legacy 'setup.py install' for nltk, since package 'wheel' is not installed. Using legacy 'setup.py install' for future, since package 'wheel' is not installed. Using legacy 'setup.py install' for pycryptodome, since package 'wheel' is not installed. Using legacy 'setup.py install' for shellcheck-py, since package 'wheel' is not installed. Installing collected packages: MarkupSafe, Werkzeug, six, pytz, Jinja2, itsdangerous, filelock, distlib, click, appdirs, virtualenv, urllib3, toml, pyyaml, pyflakes, pycryptodome, pycodestyle, nodeenv, mccabe, idna, identify, future, flask, chardet, cfgv, certifi, Babel, tqdm, shellcheck-py, requests, regex, python-dateutil, protobuf, pre-commit, Pillow, numpy, joblib, Flask-Babel, flake8, bce-python-sdk, yapf, visualdl, sentencepiece, pandas, opencv-python, nltk, gunicorn, colorlog, cma, paddlehub Running setup.py install for pycryptodome ... done Running setup.py install for future ... done Running setup.py install for shellcheck-py ... error ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-install-ld44cjeg/shellcheck-py_6c41e3dfc9024c01a78a10a03cb1b2f5/setup.py'"'"'; file='"'"'/private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-install-ld44cjeg/shellcheck-py_6c41e3dfc9024c01a78a10a03cb1b2f5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-record-14towojk/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/shellcheck-py cwd: /private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-install-ld44cjeg/shellcheck-py_6c41e3dfc9024c01a78a10a03cb1b2f5/ Complete output (4 lines): running install running build running fetch_binaries error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)>

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-install-ld44cjeg/shellcheck-py_6c41e3dfc9024c01a78a10a03cb1b2f5/setup.py'"'"'; file='"'"'/private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-install-ld44cjeg/shellcheck-py_6c41e3dfc9024c01a78a10a03cb1b2f5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/hq/qpgss1l16530qggzlw9_w8440000gq/T/pip-record-14towojk/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/shellcheck-py Check the logs for full command output.

KPatr1ck commented 3 years ago

这个应该是你当前的环境在https请求验证SSL证书时不通过,和paddlehub或其他包都没关系。

尝试用下面命令单独安装shellcheck-py后,再安装paddlehub pip --trusted-host https://mirror.baidu.com/pypi/simple install shellcheck-py pip install paddlehub

如果安装其他包还有遇到相同错误,也可按上面方式尝试解决。

15926273249 commented 3 years ago

@KPatr1ck 您好,按照上述命令还是得到相同的问题,也同样不能安装shellcheck-py,请问该如何解决呢

ssbg2 commented 2 years ago

@KPatr1ck 您好,按照上述命令还是得到相同的问题,也同样不能安装shellcheck-py,请问该如何解决呢

尝试下关番茄软件或其他代理后再试下,一般就可以了