繁体   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