报错描述:

我在win10终端中,执行如下命令,下载相关包时

pip install -e .

报错如下:

Looking in indexes: http://pypi.douban.com/simple/
Obtaining file:///E:/wrj/gym-carla
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      error: Multiple top-level packages discovered in a flat-layout: ['figures', 'gym_carla'].

      To avoid accidental inclusion of unwanted files or directories,
      setuptools will not proceed with this build.

      If you are trying to create a single distribution with multiple packages
      on purpose, you should not rely on automatic discovery.
      Instead, consider the following options:

      1. set up custom discovery (`find` directive with `include` or `exclude`)
      2. use a `src-layout`
      3. explicitly set `py_modules` or `packages` with a list of names

      To find more information, look for "package discovery" on setuptools docs.
      [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.

在这里插入图片描述

报错原因:

在这里插入图片描述
setuptools版本不适配,不能进行构建。

解决方法:

因为我当前的setuptools就是最新版,所以应该降低其版本!!
输入如下命令:

pip install --upgrade setuptools==57.5.0

在这里插入图片描述
然后再执行其他包的安装,安装成功了!!!
在这里插入图片描述

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐