Why we do this is a story for another article, where it’s explained in greater detail. Unbeknownst to many python programmers, you can actually import another python file into your python program. If this is the case, before rushing over to google this error, make sure that the library is installed at the Python installation you’re currently using. Now how is this relevant to this article? Well, if you have multiple python installations, there’s a good chance you’ve gotten confused between the two and are importing the library from the wrong place. As a result, it cannot access the libraries installed with the first Python installation. The second Python installation of mine was done through the regular method, and is stored elsewhere. As a result only the python.exe in this folder can access those libraries. Now, every time I download a library, it’s installed in the above folder. My Python.exe file path looks something like this.Ĭ://Program Files/Microsoft Visual Studio/Python37 The first I happened to download when I was setting up Visual Studio, which would serve as my IDE for Python for a good while. As I’m writing this, I currently have two Python installations myself (accidentally of course). One issue that can complicate things is if you have multiple Python installations on your computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |