简体   繁体   English

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

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

How are you guys?你们好吗?

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 error saying that it can't launch this program (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)

So I'm here to ask if anyone knows how can I install the Discord module in python without pip?所以我在这里问是否有人知道如何在没有 pip 的 python 中安装 Discord 模块?

Thanks in advance!提前致谢!

~Sami ~萨米

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. 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 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 ) Go to https://github.com/Rapptz/discord.py and download it as a zip ( Code -> Download ZIP )

在此处输入图像描述

  1. Extract the zip file on your desktop在桌面上提取 zip 文件
  2. Open the command propmt and CD into the discord.py-master directory (with cd Desktop\discord.py-master打开命令 propmt 和 CD 进入 discord.py discord.py-master目录(用cd Desktop\discord.py-master
  3. Run python setup.py install运行python setup.py install

You can try using py -m pip install discord .您可以尝试使用py -m pip install discord

Try this尝试这个

set PATH=%PATH%;C:\Python34\Scripts设置 PATH=%PATH%;C:\Python34\Scripts

check this link for more 'pip' is not recognized as an internal or external command检查此链接以获取更多“pip”未被识别为内部或外部命令

If the above doesn't work如果上述方法不起作用

You have to download the discord.py module here.您必须在此处下载 discord.py 模块。 https://pypi.org/project/discord.py/#files https://pypi.org/project/discord.py/#files

and read this if you don't know how to import files如果您不知道如何导入文件,请阅读此内容

How do I use an external.py file? 如何使用 external.py 文件?

else别的

reinstall python and set the path like the below image重新安装 python 并设置如下图所示的路径

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

暂无
暂无

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

相关问题 如何在没有ROOT ACCESS的情况下安装python模块YAML('easy_install'和'pip'不可用)? - How can I install the python module YAML without ROOT ACCESS ( 'easy_install' and 'pip' are not available)? 当我尝试使用 pip 安装 python 模块时,会导致错误。 我该如何解决? - When I try to install python module using pip, it causes error. How can I fix it? 我如何 go 关于在 discord 上创建自我机器人? 不使用 discord.py 但使用 python 中的模块请求? - How do I go about creating a self-bot on discord? Without usage of discord.py but using the module requests in python? 使用 pip 安装后,如何启动这个 Python 模块的主要 function? - How can I start the main function of this Python module after installing it using pip? 如何在我的python脚本中包含pip安装的模块? - How can I include a pip installed module with my python script? 如何使用 pip 和 PyPI 安装 Python 模块单个文件? - How can a Python module single file be installed using pip and PyPI? 我如何在没有pip或virtualenv的情况下安装python软件包 - How can I install a python package without pip or virtualenv 如何使用 pip 安装 Python MySQLdb 模块? - How to install Python MySQLdb module using pip? 如何将错误消息添加到 API 调用 discord python - How can i add error message to API call discord python 我如何使用 python 在我的 discord 机器人上添加冷却时间 - How would i add cooldown on my discord bot using python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM