简体   繁体   English

如何使用 pip 获取 python 3.6 的 webbrowser 模块?

[英]how to get webbrowser module for python 3.6 using pip ?

C:\Users\vipul>pip install webbrowser Collecting webbrowser Could not find a version that satisfies the requirement webbrowser (from versions: ) No matching distribution found for webbrowser C:\Users\vipul>pip install webbrowser 正在收集 webbrowser 找不到满足 webbrowser 要求的版本(来自版本:)没有找到 webbrowser 的匹配发行版

whenever I try to install I get this error每当我尝试安装时,我都会收到此错误

webbrowser is part of the python standard library, you don't have to install a separate package to use it because it comes bundled with your python installation. webbrowser 是 python 标准库的一部分,您不必安装单独的包来使用它,因为它与您的 python 安装捆绑在一起。

From the docs , you can use it from the command line as follows:docs ,您可以从命令行使用它,如下所示:

python -m webbrowser -t "http://www.python.org"

Or from your own scripts:或者从您自己的脚本中:

import webbrowser
webbrowser.open('https://www.python.org')

C:\\Users\\vipul>pip install webbrowser Collecting webbrowser Could not find a version that satisfies the requirement webbrowser (from versions: ) No matching distribution found for webbrowser C:\\Users\\vipul>pip install webbrowser 正在收集 webbrowser 找不到满足 webbrowser 要求的版本(来自版本:)没有找到与 webbrowser 匹配的发行版

whenever I try to install I get this error每当我尝试安装时都会收到此错误

写入后可以使用 webbrowser 模块打开 .txt 文件吗?

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

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