zl程序教程

您现在的位置是:首页 >  工具

当前栏目

pip install -q git+https://github.com/tensorflow/docs.git报错

GitHubpipGitHTTPS 报错 Tensorflow com install
2023-09-27 14:26:28 时间

1.报错信息1

 ERROR: Command errored out with exit status 128:
   command: git clone -q https://github.com/tensorflow/docs.git /tmp/pip-req-build-ndg3zlg6
       cwd: None
  Complete output (1 lines):
  fatal: unable to access 'https://github.com/tensorflow/docs.git/': gnutls_handshake() failed: Error in the pull function.
  ----------------------------------------
WARNING: Discarding git+https://github.com/tensorflow/docs.git. Command errored out with exit status 128: git clone -q https://github.com/tensorflow/docs.git /tmp/pip-req-build-ndg3zlg6 Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q https://github.com/tensorflow/docs.git /tmp/pip-req-build-ndg3zlg6 Check the logs for full command output.

2.解释

  • -q参数,控制安装过程中的打印输出,qquite,详细可使用pip --help查看
    help of pip
    去掉q参数可打印更加详细的报错信息。

3.报错信息2及解决

(tf) lx@lx-rob:~/gitee/object_detection_task/cv_examples/tf_tutorials/basic_regression$ pip install git+https://github.com/tensorflow/docs.git
Collecting git+https://github.com/tensorflow/docs.git
  Cloning https://github.com/tensorflow/docs.git to /tmp/pip-req-build-3gz5djsh
  Running command git clone -q https://github.com/tensorflow/docs.git /tmp/pip-req-build-3gz5djsh
  fatal: unable to access 'https://github.com/tensorflow/docs.git/': Failed to connect to github.com port 443: Connection timed out
WARNING: Discarding git+https://github.com/tensorflow/docs.git. Command errored out with exit status 128: git clone -q https://github.com/tensorflow/docs.git /tmp/pip-req-build-3gz5djsh Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q https://github.com/tensorflow/docs.git /tmp/pip-req-build-3gz5djsh Check the logs for full command output.

可以看到timeout了,试了一下github打不开,去码云gitee搜了个tensorflow_doc的仓库,替换一下仓库地址就可以安装了

pip install git+https://gitee.com/hejuncheng1/tensorflow-docs.git
Collecting git+https://gitee.com/hejuncheng1/tensorflow-docs.git
  Cloning https://gitee.com/hejuncheng1/tensorflow-docs.git to /tmp/pip-req-build-_589vul5
  Running command git clone -q https://gitee.com/hejuncheng1/tensorflow-docs.git /tmp/pip-req-build-_589vul5
Collecting astor
  Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)
Requirement already satisfied: absl-py in /home/lx/anaconda3/envs/tf/lib/python3.7/site-packages (from tensorflow-docs==0.0.0) (0.12.0)
Requirement already satisfied: six in /home/lx/anaconda3/envs/tf/lib/python3.7/site-packages (from tensorflow-docs==0.0.0) (1.15.0)
Collecting pathlib2

tfdocs