PaddlePaddle / PaddleSeg

Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting, 3D Segmentation, etc.
https://arxiv.org/abs/2101.06175
Apache License 2.0
8.68k stars 1.68k forks source link

pip install -e . 报错 #1954

Closed photkey closed 2 years ago

photkey commented 2 years ago

pip install -e . 报错,安装不上。

PS D:\MySoft\RunAny\Python\PaddleSeg> pip list
Package            Version
------------------ -------------
astor              0.8.1
certifi            2021.10.8
charset-normalizer 2.0.12
decorator          5.1.1
idna               3.3
numpy              1.19.3
paddlepaddle-gpu   2.2.2.post112
Pillow             9.0.1
pip                22.0.4
protobuf           3.19.4
requests           2.27.1
setuptools         61.0.0
six                1.16.0
urllib3            1.26.9
wheel              0.37.1
PS D:\MySoft\RunAny\Python\PaddleSeg> pip install -e .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///D:/MySoft/RunAny/Python/PaddleSeg
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "D:\MySoft\RunAny\Python\PaddleSeg\setup.py", line 19, in <module>
          import paddleseg
        File "D:\MySoft\RunAny\Python\PaddleSeg\paddleseg\__init__.py", line 15, in <module>
          from . import models, datasets, transforms
        File "D:\MySoft\RunAny\Python\PaddleSeg\paddleseg\models\__init__.py", line 15, in <module>
          from .backbones import *
        File "D:\MySoft\RunAny\Python\PaddleSeg\paddleseg\models\backbones\__init__.py", line 15, in <module>
          from .hrnet import *
        File "D:\MySoft\RunAny\Python\PaddleSeg\paddleseg\models\backbones\hrnet.py", line 21, in <module>
          from paddleseg.cvlibs import manager, param_init
        File "D:\MySoft\RunAny\Python\PaddleSeg\paddleseg\cvlibs\__init__.py", line 17, in <module>
          from .config import Config
        File "D:\MySoft\RunAny\Python\PaddleSeg\paddleseg\cvlibs\config.py", line 20, in <module>
          import yaml
      ModuleNotFoundError: No module named 'yaml'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
  1. PaddleSeg版本:PaddleSeg release/2.4
  2. PaddlePaddle版本:paddlepaddle-gpu 2.2.2.post112
  3. 操作系统信息:Windows11
  4. Python版本号:python3.8.10/3.9.12(完全一样的报错信息)
  5. CUDA/cuDNN版本:CUDA10.2/cuDNN 7.6.5
  6. 完整的代码:完整 未修改
  7. 详细的错误信息、相关log:(若使用多卡,log默认保存在log/worklog.0)
  8. 运行指令或复现步骤:
  9. 其他内容: (增加其他与问题相关的内容)
shiyutang commented 2 years ago

You should try pip intall -r requirements.txt first. It seems that you didn't install yaml which is required in the requirement.txt.