【发布时间】:2021-07-07 17:50:41
【问题描述】:
您好,我正在尝试在 google colab 上启动 tensorflow 训练过程。我正在尝试在 google colab 的集成笔记本中运行此代码块。代码块是:
!apt-get install protobuf-compiler python-pil python-lxml python-tk
!pip install Cython
%cd '/content/gdrive/My Drive/models/research/'
!protoc object_detection/protos/*.proto --python_out=.
import os
os.environ['PYTHONPATH'] += ':/content/gdrive/My Drive/models/research/:/content/gdrive/My Drive/models/research/slim'
!python setup.py build
!python setup.py install
它给出了这个输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
protobuf-compiler is already the newest version (3.0.0-9.1ubuntu1).
python-lxml is already the newest version (4.2.1-1ubuntu0.4).
python-pil is already the newest version (5.1.0-1ubuntu0.6).
python-tk is already the newest version (2.7.17-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
Requirement already satisfied: Cython in /usr/local/lib/python3.7/dist-packages (0.29.23)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
/content/gdrive/My Drive/models/research
python3: can't open file 'setup.py': [Errno 2] No such file or directory
python3: can't open file 'setup.py': [Errno 2] No such file or directory
我想我无法正确设置 python 路径。谁能帮帮我?
【问题讨论】:
标签: python tensorflow google-colaboratory