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.72k stars 2.08k forks source link

安装报错 matplotlib from paddlehub #1437

Open codeWang-J opened 3 years ago

codeWang-J commented 3 years ago

具体报错信息如下: wangjin@wangjin-desktop:~$ sudo pip3 install --upgrade paddlehub -i https://mirror.baidu.com/pypi/simple [sudo] password for wangjin: The directory '/home/wangjin/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/wangjin/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting paddlehub Downloading https://mirror.baidu.com/pypi/packages/7a/29/3bd0ca43c787181e9c22fe44b944b64d7fcb14ce66d3bf4602d9ad2ac76c/paddlehub-2.1.0-py3-none-any.whl (211kB) 100% |????????????????????????????????| 215kB 1.3MB/s Collecting flask>=1.1.0 (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/54/4f/1b294c1a4ab7b2ad5ca5fc4a9a65a22ef1ac48be126289d97668852d4ab3/Flask-2.0.1-py3-none-any.whl (94kB) 100% |????????????????????????????????| 102kB 2.8MB/s Requirement already up-to-date: packaging in ./.local/lib/python3.6/site-packages (from paddlehub) Collecting paddle2onnx>=0.5.1 (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/e7/cf/ca3220acff28023e8967f720271411e109b37624b73b34729ce2c2fe72ad/paddle2onnx-0.6-py3-none-any.whl (94kB) 100% |????????????????????????????????| 102kB 2.5MB/s Requirement already up-to-date: Pillow in /usr/local/lib/python3.6/dist-packages (from paddlehub) Collecting colorama (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl Collecting numpy (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/51/60/3f0fe5b7675a461d96b9d6729beecd3532565743278a9c3fe6dd09697fa7/numpy-1.19.5.zip (7.3MB) 100% |????????????????????????????????| 7.3MB 75kB/s Collecting pyyaml (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz (175kB) 100% |????????????????????????????????| 184kB 1.0MB/s Collecting rarfile (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/95/f4/c92fab227c7457e3b76a4096ccb655ded9deac869849cb03afbe55dfdc1e/rarfile-4.0-py3-none-any.whl Collecting pyzmq (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/99/3b/69360102db726741053d1446cbe9f7f06df7e2a6d5b805ee71841abf1cdc/pyzmq-22.1.0.tar.gz (1.2MB) 100% |????????????????????????????????| 1.2MB 418kB/s Collecting gunicorn>=19.10.0; sys_platform != "win32" (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/e4/dd/5b190393e6066286773a67dfcc2f9492058e9b57c4867a95f1ba5caf0a83/gunicorn-20.1.0-py3-none-any.whl (79kB) 100% |????????????????????????????????| 81kB 3.9MB/s Collecting visualdl>=2.0.0 (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/31/99/f5f50d035006b0d9304700facd9e1c843af8e02569474996d1b6a79529f6/visualdl-2.2.0-py3-none-any.whl (2.7MB) 100% |????????????????????????????????| 2.7MB 200kB/s Collecting paddlenlp>=2.0.0rc5 (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/07/0b/2ebd839e7393c66ce7d2a25f008680b8d6812b0e29508326d684bcbbf7ba/paddlenlp-2.0.1-py3-none-any.whl (375kB) 100% |????????????????????????????????| 378kB 1.3MB/s Collecting matplotlib (from paddlehub) Downloading https://mirror.baidu.com/pypi/packages/22/d4/e7ca532e68a9357742604e1e4ae35d9c09a4a810de39a9d80402bd12f50f/matplotlib-3.3.4.tar.gz (37.9MB) 100% |????????????????????????????????| 37.9MB 14kB/s Complete output from command python setup.py egg_info: ERROR: Failed to build one or more wheels Traceback (most recent call last): File "/home/wangjin/.local/lib/python3.6/site-packages/setuptools/installer.py", line 75, in fetch_build_egg subprocess.check_call(cmd) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6lhz2b74', '--quiet', 'numpy>=1.15']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-fa1_fsut/matplotlib/setup.py", line 312, in <module>
    cmdclass=cmdclass,
  File "/home/wangjin/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/home/wangjin/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/home/wangjin/.local/lib/python3.6/site-packages/setuptools/dist.py", line 782, in fetch_build_eggs
    replace_conflicting=True,
  File "/home/wangjin/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 768, in resolve
    replace_conflicting=replace_conflicting
  File "/home/wangjin/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "/home/wangjin/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1063, in obtain
    return installer(requirement)
  File "/home/wangjin/.local/lib/python3.6/site-packages/setuptools/dist.py", line 838, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/home/wangjin/.local/lib/python3.6/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6lhz2b74', '--quiet', 'numpy>=1.15']' returned non-zero exit status 1.

Edit setup.cfg to change the build options; suppress output with --quiet.

BUILDING MATPLOTLIB
  matplotlib: yes [3.3.4]
      python: yes [3.6.9 (default, Jan 26 2021, 15:33:00)  [GCC 8.4.0]]
    platform: yes [linux]
 sample_data: yes [installing]
       tests: no  [skipping due to configuration]
      macosx: no  [Mac OS-X only]

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fa1_fsut/matplotlib/

haoyuying commented 3 years ago

建议您先将之前的paddlehub卸载干净之后重新安装,安装 paddle2.1及paddlehub2.1版本。目前报错信息是安装混乱导致的。