[英]im new and python wont let me install the pafy module or the vlc module so i can do my first project, how to fix?
嗨,我是新手,我想看看 Python 模塊是如何工作的,但是每當我import pafy
時,它都會說modulenotfounderror ,當我install pafy
時,它會說 I in install 是一個語法錯誤。 那么我該如何解決呢? 我要下載東西嗎? 我知道答案可能看起來很明顯,但這是我第一次使用一個,這兩個是我得到的唯一答案,所以幫助兄弟嗎?
您需要使用命令行pip install pafy
有關詳細信息,請參閱pip 文檔。
或者,如果您想從 python 文件安裝它,您可以制作一個並使用以下代碼運行它:
import pip
pip.main(['install', 'pafy'])
從命令行使用pip
。 Assuming you've installed python from the official website ( https://python.org ), pip should be pre-installed, and you can simply run command line (hotkey win + r
and type in cmd
on windows) and type in pip install <module name here>
,在你的情況下這將是 pafy。
使用(本網站)獲取更多信息,它為 macOS、Windows 和 Linux 提供 pip 命令
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.