pip install -e. 时出现的错误

pip install -e. 时出现的错误

今天在给项目文件安装依赖时,使用pip install -e.来安装时,出现报错:

(cheetah_gym) mutong@mutong-System-Product-Name:~/RobotDoc/cheetah_gym$ pip install -e.
Obtaining file:///home/mutong/RobotDoc/cheetah_gym
  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: ['docker', 'cheetah_gym'].
      
      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.

原因是有多个高级包,docker、cheetch_gym,搜索解决办法时有提出

python setup.py install --exclude-packages=lib,script

但是报错

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --exclude-packages not recognized

其他人解决方法

最终的方法是在setup.py文件中加入py_modules=[]这一项

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Gourdscan v2.1 被动式漏洞扫描系统 Passive Vulnerability Scan 为避免 Gourdscan 被恶意利用,开源版本只放出了简单的探测规则,无法用作为黑客入侵工具。请使用者遵守《中华人民共和国网络安全法》,勿将 Gourdscan 用于未授权的测试,参与项目的社区成员/YSRC/同程安全应急响应中心/同程网络科技股份有限公司不负任何连带法律责任。 安装依赖: Linux 安装 Redis apt-get install redis-server 或从源码编译安装 wget http://download.redis.io/redis-stable.tar.gz && tar xzf redis-stable.tar.gz && cd redis-stable && make && make install 系统已有 Redis 的,运行 redis-server --version 查看自己的版本,需注意2.x版本的 Redis 会有问题 安转 python 类库 基础模块 安装pip wget https://sec.ly.com/mirror/get-pip.py --no-check-certificate && python get-pip.py -i https://mirrors.aliyun.com/pypi/simple/ $ pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ 其他事项 以下如果有报错便可以安装,一般不需要安装 镜像: https://sec.ly.com/mirror/libdnet-libdnet-1.12.tar.gz https://sec.ly.com/mirror/pylibpcap-0.6.4.tar.gz $ wget https://github.com/dugsong/libdnet/archive/master.zip && unzip master.zip $ wget http://dfn.dl.sourceforge.net/sourceforge/pylibpcap/pylibpcap-0.6.4.tar.gz && tar zxf pylibpcap-0.6.4.tar.gz Windows 下载 Redis https://sec.ly.com/mirror/Redis-x64-3.2.100.zip 启动 Redis redis-server.exe GourdScan路径\conf\redis.conf 如需使用网卡抓包方式,同程src已有各依赖镜像,可以把exe文件都装上 https://sec.ly.com/mirror/dnet-1.12.win32-py2.7.exe https://sec.ly.com/mirror/dpkt-1.7.win32.exe https://sec.ly.com/mirror/pcap-1.1.win32-py2.7.exe https://sec.ly.com/mirror/WinPcap_4_1_3.exe OSX 安装 homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 安装 redis brew install redis 启动 redis redis-server conf/redis.conf 安装依赖 pip install pcapy -i https://pypi.doubanio.com/simple/ git clone https://github.com/dugsong/libdnet.git && cd libdnet && ./configure && make && cd python && python setup.py install 使用方法: redis-server conf/redis.conf python gourdscan.py conf.json 默认平台用户名密码为:admin:Y3rc_admin 默认redis密码为:Y3rc_Alw4ys_B3_W1th_Y0u 如果有勾选sqlmap api scan选项,请在服务器上开启sqlmap api。 一切正常的话你就可以在8000端口上访问到 GourdScanV2 的 web 界面了 Start Monitor 中提供了三种代理方式,区别的话在下方文档有

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值