如何在我的项目中插入pytube扩展

2024-04-25 17:44:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我的代码以:

"from pytube import YouTube"
an the error is:
unresolved import 'pytube

如何导入pytube库


Tags: the代码fromimportanyoutubeiserror
1条回答
网友
1楼 · 发布于 2024-04-25 17:44:57

关于VS代码中模块“pytube”的使用,您可以参考以下内容:

  1. 请检查终端使用的python是否与VS代码当前选择的python(显示在VS代码的左下角)相同:(pip versionpython version

    enter image description here

    如果它们不相同,请使用快捷键Ctrl+Shift+`打开新的终端,它将自动进入所选环境

  2. 安装模块。(pip install pytube

  3. 检查:(pip show pytube

    enter image description here

运行:

enter image description here

相关问题 更多 >

    热门问题