簡體   English   中英

如何在不使用 pip 的情況下在 python 中添加 Discord 模塊?

[英]How can I add the Discord module in python without using pip?

你們好嗎?

So to get straight to the point I wanted to create a Discord bot using Python but the thing is that when I want to install the discord module using pip by typing pip install discord but since I'm using a PC without admin rights I have an錯誤說它不能啟動這個程序(pip)

所以我在這里問是否有人知道如何在沒有 pip 的 python 中安裝 Discord 模塊?

提前致謝!

~薩米

It depends on which IDE you are using For example, you can download pycharm if you don't already have it and you can download the package from pycharm itself.

How you can do that is going to file ➜ Settings ➜ Project ➜ Python Interpreter ➜ and click the + sign over the package label and there you will be able to search for any package you want like discord.py

  1. Go to https://github.com/Rapptz/discord.py and download it as a zip ( Code -> Download ZIP )

在此處輸入圖像描述

  1. 在桌面上提取 zip 文件
  2. 打開命令 propmt 和 CD 進入 discord.py discord.py-master目錄(用cd Desktop\discord.py-master
  3. 運行python setup.py install

您可以嘗試使用py -m pip install discord

嘗試這個

設置 PATH=%PATH%;C:\Python34\Scripts

檢查此鏈接以獲取更多“pip”未被識別為內部或外部命令

如果上述方法不起作用

您必須在此處下載 discord.py 模塊。 https://pypi.org/project/discord.py/#files

如果您不知道如何導入文件,請閱讀此內容

如何使用 external.py 文件?

別的

重新安裝 python 並設置如下圖所示的路徑

https://miro.medium.com/max/1282/1*ecMIFT0gDLcLRD1y5q8_Tg.png

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM