我正在运行以下命令!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.
我正在研究Google Colab。 谢谢
答案 0 :(得分:0)
sudo pip3 install --upgrade pip setuptools wheel
尝试使用它,可能会起作用
答案 1 :(得分:0)
安装wsgiref时出错,但已在python3中安装。也尝试在colab中使用python2看看是否有效
答案 2 :(得分:0)
似乎问题出在wsgiref
上,它已经安装了,但是pip
试图重新安装它。
请尝试如下分别安装2个库
%pip install bert-tensorflow
%pip install --no-dependencies natural-questions
如果以后对natural-questions
的任何依赖项有任何疑问,请尝试手动安装。
例如用于以后的发行版
%pip install language
答案 3 :(得分:0)
现在我跑步时:
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 .
之前