协作错误:错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获得完整的命令输出

2024-04-29 10:23:17 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在运行以下命令!pip install bert-tensorflow natural-questions,它给了我一个错误:

Collecting bert-tensorflow
  Using cached https://files.pythonhosted.org/packages/20/16/0f9376af49c6adcfbaf2470a8f500105a74dd803aa54ac0110af445837b5/bert_tensorflow-1.0.4-py2.py3-none-any.whl
Collecting natural-questions
  Using cached https://files.pythonhosted.org/packages/d5/d7/020da0200e8129c0ae7a1da998c7ff84dd2f3a4660711b2aa39286c67f85/natural_questions-1.0.4-py2.py3-none-any.whl
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from bert-tensorflow) (1.15.0)
Requirement already satisfied: tornado in /usr/local/lib/python3.6/dist-packages (from natural-questions) (5.1.1)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.6/dist-packages (from natural-questions) (2.11.2)
Collecting wsgiref
  Using cached https://files.pythonhosted.org/packages/41/9e/309259ce8dff8c596e8c26df86dbc4e848b9249fd36797fd60be456f03fc/wsgiref-0.1.2.zip
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我正在谷歌colab上工作。 谢谢


Tags: httpsorgpackagestensorflowfilesrequirementnaturalbert
3条回答

安装wsgiref时出错,但其已安装在python3中。还可以尝试在colab中使用python2,看看它是否有效

sudo pip3 install --upgrade pip setuptools wheel


试着用这个,它可能有用

现在当我跑步时:

python -m language.question_answering.bert_joint.prepare_nq_data \
  --logtostderr \
  --input_jsonl ~/data/nq-train-??.jsonl.gz \
  --output_tfrecord ~/output_dir/nq-train.tfrecords-00000-of-00001 \
  --max_seq_length=512 \
  --include_unknowns=0.02 \
  --vocab_file=bert-joint-baseline/vocab-nq.txt

这给了我一个错误:

/usr/bin/python3: Error while finding module specification for 'language.question_answering.bert_joint.prepare_nq_data' (ModuleNotFoundError: No module named 'language')

在此之前,我也会毫无错误地运行gsutil cp -R gs://bert-nq/bert-joint-baseline .

相关问题 更多 >