【发布时间】:2020-04-02 21:52:22
【问题描述】:
我尝试将一些代码从 Colab 传输到 Jupyter 笔记本。
Colab中的代码是:
# Use some functions from tensorflow_docs
!pip install -q git+https://github.com/tensorflow/docs
我得到错误:
ERROR: Could not detect requirement name for 'git+https://github.com/tensorflow/docs', please specify one with #egg=your_package_name"
如果它尝试不带“!”一开始:
pip install -q git+https://github.com/tensorflow/docs
我得到一个错误:
File "<ipython-input-11-8fda094c7d6e>", line 5
pip install -q git+https://github.com/tensorflow/docs
^
SyntaxError: invalid syntax
有人可以帮帮我吗?
【问题讨论】:
-
你用的是什么 Python 版本和什么 Jupyter 版本?
-
Python:3.7.5 // Jupyter Notebook:6.0.2 // Tensorflow:2.0.0
-
你能用 pip3 试试吗?还有什么是 pip3 版本?
-
如果我尝试使用 !pip3 install -q git+github.com/tensorflow/docs 我得到错误:Der Befehl "pip3" ist entweder falsch geschrieben oder konnte nicht gefunden werden。
标签: tensorflow jupyter-notebook google-colaboratory