filmov
tv
Python 3 Programming Tutorial - Installing modules

Показать описание
At this point, you've got all the basics necessary to start employing modules.
We still have to teach classes, among a few other necessary basics, but now would be a good time to talk about modules.
IF you are using linux, installing Python modules is incredibly stupid easy. For programming, linux is just lovely when it comes to installing packages for just about whatever. I believe mac allows similar treatment, though I've not done it myself.
At the time of starting Python, a large part of my troubles was that I didn't actually understand the process of getting a module, and this is obviously very frustrating.
Python is going to look in a few places for modules.
That's going to be site-packages and the script's directory for the most part. There are some other places you can use, but let's leave them out of it. Knowing this allows you yourself to make your own modules, in the form of just a script if you want, putting that in the same directory as your main script, and then using import to bring it on board, you can also place multiple scripts in a dir and use that. Once you begin to familiarize yourself with this, and understand how and why things work, it will help you a lot.
Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
We still have to teach classes, among a few other necessary basics, but now would be a good time to talk about modules.
IF you are using linux, installing Python modules is incredibly stupid easy. For programming, linux is just lovely when it comes to installing packages for just about whatever. I believe mac allows similar treatment, though I've not done it myself.
At the time of starting Python, a large part of my troubles was that I didn't actually understand the process of getting a module, and this is obviously very frustrating.
Python is going to look in a few places for modules.
That's going to be site-packages and the script's directory for the most part. There are some other places you can use, but let's leave them out of it. Knowing this allows you yourself to make your own modules, in the form of just a script if you want, putting that in the same directory as your main script, and then using import to bring it on board, you can also place multiple scripts in a dir and use that. Once you begin to familiarize yourself with this, and understand how and why things work, it will help you a lot.
Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Комментарии