繁体   English   中英

在 jupyter 笔记本上导入 wget 和无效语法

[英]import wget and invalid syntax on jupyter notebook

我是 Python 初学者。

我成功使用了在 colab 上运行的“图像增强(来自 tensorflow lib)”,我想在 jupyter notebook 上运行它,所以我移动了它。

在此处输入图像描述

import wget "https://photos.app.goo.gl/5xYLFcdUa8k3a5p97" -O original.png

当我执行“运行”按钮并打印这个词

File "<ipython-input-19-9c130066c119>", line 1
    import wget "https://photos.app.goo.gl/5xYLFcdUa8k3a5p97" -O original.png
                ^
SyntaxError: invalid syntax

我处于制作(超分辨率)系统的情况(我想在不使用 colab 的情况下使用 jupyter notebook)

wget不是 Python 模块,所以你不能导入它。 urllib是一个可导入的 Python 模块,可用于检索图像等互联网资源。

You will find it helpful to read the urllib HOWTO and other relevant Python docs: https://docs.python.org/3/howto/urllib2.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM