d中导入discord但在vs代码中导入discord时出现语法

d中导入discord但在vs代码中导入discord时出现语法

本文介绍了在cmd中导入discord但在vs代码中导入discord时出现语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试导入discord时出现语法错误,所有内容均在vscode中起作用,但在cmd中不起作用

I get a syntax error when I try to import discord, everything works in vscode but not in cmd

我的代码就是

import discord

推荐答案

我首先取消了discord模块,并更改了发生错误的代码,但是'\ N'不在子字符串中,这是一个问题,但是我还出现了一个新错误:/(与discord模块无关).找不到_socket模块,因此只需重新安装python.

I first oppened the discord module and changed the code where the error occured, there was an issue with the '\N' not being in a substring,but I also got a new error :/(that had nothing to do with discord module).The _socket module was nowhere to be found so just reinstall python.

这篇关于在cmd中导入discord但在vs代码中导入discord时出现语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 21:08