如何修复错误:命令出错,退出状态1:python setup.py egg\u info试图构建一个项目时

dsf9zpds  于 2021-06-15  发布在  ElasticSearch
关注(0)|答案(0)|浏览(267)

我试图建立一个项目,这是基于去郎
python版本- Python 3.7.9 go lang版本- go version go1.15 linux/amd64 在中设置以下设置 .bashrc 为go开发

export GOPATH=$HOME/code/go
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

运行命令后- make clean 输出为:

2020/08/28 17:43:47 Found Elastic Beats dir at /home/bhavya/code/go/src/github.com/elastic/beats
/home/bhavya/.magefile cleaned

然后我跑了, make 命令,其输出为:

go build -i -ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=2020-08-28T12:13:53Z -X github.com/elastic/beats/libbeat/version.commit=f74806ded71b29e4de0f78b366de4f371dc65d0f"

然后,他跑了 mage -v package 输出产生以下错误-

2020/08/28 17:44:30 Found Elastic Beats dir at /home/bhavya/code/go/src/github.com/elastic/beats
Running target: Package
elastic_beat_oss package spec loaded from [/home/bhavya/code/go/src/github.com/elastic/beats/dev-tools/packaging/packages.yml]
Running dependency: github.com/elastic/beats/metricbeat/scripts/mage.PrepareModulePackagingOSS
Running dependency: github.com/elastic/beats/metricbeat/scripts/mage.GenerateDirModulesD
Running dependency: github.com/elastic/beats/dev-tools/mage/target/update.Update
exec: make update
created virtual environment CPython3.7.9.final.0-64 in 160ms
  creator CPython3Posix(dest=/home/bhavya/code/go/src/github.com/elastic/beats/metricbeat/build/python-env, clear=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/bhavya/.local/share/virtualenv)
    added seed packages: pip==20.2.2, setuptools==49.6.0, wheel==0.35.1
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
    ERROR: Command errored out with exit status 1:
     command: /home/bhavya/code/go/src/github.com/elastic/beats/metricbeat/build/python-env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eevcydxx/functools32/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eevcydxx/functools32/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-312od7zv
         cwd: /tmp/pip-install-eevcydxx/functools32/
    Complete output (1 lines):
    This backport is for Python 2.7 only.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
../libbeat/scripts/Makefile:242: recipe for target 'python-env' failed
make:***[python-env] Error 1
package ran for 4.855821306s
Error: running "make update" failed with exit code 2

我已经安装了 python3-venv 包,使用 sudo apt-get install python3-venv ,参考本官方文件
有人能帮我解决这个问题吗

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题