简体   繁体   English

我完全对 Python 的目录、虚拟环境和文件处理感到困惑

[英]I'm completely confused with Python's directories, virtual environments and file handling

First off let me apologize in case none of this makes sense to you but I will try my best explaining my problem.首先让我道歉,如果这对你没有意义,但我会尽力解释我的问题。

I'm new to Python and I have been constantly dealing with files and programs that don't run, confusing terminal errors and more.我是 Python 新手,我一直在处理无法运行的文件和程序、混淆终端错误等等。 I've been trying to follow a tutorial which consists of accessing a remote MySql database using python but when I try to execute the program (just like the guy in the tutorial) nothing happens.我一直在尝试遵循一个教程,其中包括使用 python 访问远程 MySql 数据库,但是当我尝试执行该程序时(就像教程中的那个人一样)没有任何反应。 This isn't the first time something like this happens as I have barely been able to use any modules because the program can't find them.这不是第一次发生这样的事情,因为我几乎无法使用任何模块,因为程序找不到它们。 I've also encountered that (inside) VSCode's terminal show's me a bunch of directories which I have no clue why they're there or if that might be the cause of all these problems: As you can see here right after running the program, the terminal opens up and by default shows multiple directories, and if I'm not wrong there should only be one?我还遇到过(在内部)VSCode 的终端向我显示了一堆目录,我不知道它们为什么在那里,或者这是否可能是所有这些问题的原因:正如您在运行程序后可以看到的那样,终端打开并默认显示多个目录,如果我没有错,应该只有一个? 正如您在运行程序后立即看到的那样,终端打开并默认显示多个目录,如果我没有错,应该只有一个?

This is what happens when I try to execute the program (nothing happens) and as I've seen in the tutorial, a lot of data should start appearing but the only thing happening is that a new line is created.这就是我尝试执行程序时发生的情况(什么也没发生),正如我在教程中看到的那样,应该开始出现大量数据,但唯一发生的事情是创建了一个新行。 这就是我尝试执行程序时发生的情况(什么也没发生),正如我在教程中看到的那样,应该开始出现大量数据,但唯一发生的事情是创建了一个新行。

I could really use some help, this is not allowing me to make any progress and I'm starting to get frustrated because I can't even find any help online.我真的可以使用一些帮助,这不允许我取得任何进展,我开始感到沮丧,因为我什至无法在网上找到任何帮助。

Thank you and sorry if my problem isn't very clear but even I don't know what the problem is.谢谢,对不起,如果我的问题不是很清楚,但即使我不知道问题是什么。

NOTE THAT THOSE ARE NOT MY PERSONAL DETAILS IT'S FROM AN OPEN DATABASE请注意,这些不是我的个人详细信息,它来自一个开放的数据库

Please change请更换

SELECT = FROM DICTIONARY选择 = 从字典

to

SELECT * FROM DICTIONARY从字典中选择 *

on your query.关于您的查询。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM