Hi! First post here, and am new to coding/Python in general and am therefore just starting Mosh’s Python course. What might (or might not) be a complicating factor is that the operating system I use is a Linux OS (Mint XFCE).
For example, in one of the first videos, he says that when installing it to Windows to make sure to check “Add Python 3.7 to PATH” and that this is critical to following along with the course. Does anyone know if there is an equivalent step when installing it in Linux, though?
And then there is everything else he says to install, such as VSCode and its extensions such as Pylint. Same thing – will this translate to Linux?
Everything Mosh will teach you will work well in Linux. Python, vscode, and most other things all work well in Linux as well as MacOS and Windows. The core of his teaching will be about Python and you’ll be able to do that no matter what editor or operating system you choose to use.
Unfortunately I’m not sure that’s been my experience so far. One issue I brought up in my initial post that still concerns me is the inability to select “Add Python 3.7 to Path” as he says is required when installing it with Windows. I WAS able to install Python onto my Linux system, but, again, that option was never presented.
And now I’m having trouble with following the “Linting Python Code” video. For example, when I enter print “Hello World” (as in leaving out the parentheses) and save it, it’s the words “Hello World” and not print that has the red line, and when I hover over it, rather than [Pylint] E0001:Missing parent… as shown in the video, the message is “Statements must be separated by newlines or semicolons Pylance.” So, yes, Pylance, not Pylint. What’s also weird is that it then says “no quick fixes available.” Why wouldn’t it just tell me to add the parentheses?
So, yes, I don’t know if this is due to the problem I mentioned above, or maybe I’m just using a different version of VSCode or something. But it definitely seems different!
You could get an answer of someone telling you exactly what you need to do. Instead, maybe take this as an opportunity to learn the tooling better.
First, look into Path variable and understand what it is and why you use it. It is not very complicated and would give you a better understanding of what you are doing by adding Python to the path variable. Adding programs to path is pretty common and it is not directly tied to just Python. Spoiler: it’s basically just list of directories that your computer is instructed to search through. When you type Python into the terminal then the computer will look through all the directories located in path and try to find an executable called Python. Then it will use that program to run the commands. If you didn’t attach it to path then it would have no idea where to find the program and you would have to tell it.
Second, look up the documentation for vscode on their site and go through it. I believe there is even a section of it dedicated to installing and setting up Python. There are many linters you can choose from and the documentation will help you learn how to
change which one you are using. Learning about the options a little more will help you learn more about the code editor you are going to be using. It’s the main tool you are writing your code in so it makes sense to learn more about it.
I get that these things arent talked about directly in the course and it’s a source of confusion for people that are entirely new to the concepts.
I really think if you combine learning about your os tools, code editor, and programming language then it helps make things click a little easier.
MTownsend, The problem with that answer, I think (and I’m being totally serious here) is that learning coding/Python is intimidating enough for someone like me. I don’t really feel enthusiastic about now also having to learn about these ancillary issues such as the path variable. And it’s certainly disheartening when I input what he does into VSCode and it behaves totally differently from what’s in the video. Again, I don’t know if that’s due to the issue described above, or maybe if the material is just outdated – I think there was some reference to the year 2018 somewhere in there!
Hopefully things will turn around, but right now, let’s just say that I’m glad I took advantage of the $9.95 sale and didn’t pay $149.
I get where you are coming from. To be fair, the course is to teach you Python and not all the other tools. You are not the first person to be tripped up by this, and the first part of the course should hold newer peoples hand more. The forum is littered with other users sharing the same issues as you.
With that stated, mentioning the minor details that could be polished more doesn’t really help to get you past the humps you are currently facing. Other users can just try to point you in the right direction and help fill in the holes so you can get back to learning what you came for.
The rest of the course does cover Python pretty well once you get past learning just a tad about the suggested code editor.
Personally, I think a secondary editor should have been skipped for this course and just they should have used the editor (IDLE) that comes bundled with Python when it was downloaded. It doesn’t have all the features of other editors but being more simple allows users to not fiddle with editor configurations so they can focus on learning the language.
Good point about IDLE – I almost asked that as a postscript to my original post. Yes, I’ve learned of this from other videos on Youtube, etc., and was wondering if it’s a reasonable replacement. That I have already installed, and unlike VSCode, seems to behave exactly as expected. So, that’s something I may have to consider, using Mosh’s course for the actual principles but using IDLE for the execution.
And I’m also glad to hear that other people have been tripped up by this!