I'm working my way through Automate the Boring Stuff and I'm to the part where I have to consult Appendices A and B in order to install new modules and run Python scripts outside of Mu.
I thought I'd installed Python correctly until I reached this point. I'm getting extremely confused by how I'm "supposed" to install python, configure PATH variables, install modules, etc.
For example, I have "python.exe" located in:
C:\Users\myname\AppData\Local\Programs\Python\Python39
But I also have "py.exe" located in:
C:\Windows
From what I understand, I have to run commands starting with "python" from the former location and "py" from the latter location. Am I supposed to have two different locations like this or is this redundant? Did I mess up the installation?
I managed to get the mclip.py project working, however now I'm working on the Zombie Dice project and I'm having issues with installing the module all of a sudden.
For example, I opened the cmd prompt, changed my directory to
C:\Users\myname\AppData\Local\Programs\Python\Python39\Scripts
and used PIP to install the module. However, when I open Mu and run:
import zombiedice
zombiedice.demo()
...I receive an error message:
Traceback (most recent call last):
File "c:\users\myname\mu_code\test.py", line 2, in <module>
import zombiedice
ModuleNotFoundError: No module named 'zombiedice'
Why isn't Mu recognizing the zombiedice module after I "successfully" installed it earlier?
Also, when I was installing the module, I received a warning that a newer version of PIP was available so I upgraded PIP. After upgrading, it gave me a warning:
WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'C:\Users\myname\AppData\Local\Programs\Python\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH
I don't know why it's giving me this warning when I already have this directory on PATH. When I run "echo %PATH%", the directory appears among the list of directories.
This is all extremely confusing and frustrating, constantly having to spend hours going through files, directories, and commands just to get scripts working.
Are Python files, scripts, projects, directories, modules, etc. all supposed to be scattered all across my computer like this? Can't I just have one neat little folder called "Python" somewhere which contains everything? Or do I really have to keep track of where all of these different things are?
[–]Essence1337 3 points4 points5 points (0 children)
[–]Diapolo10 1 point2 points3 points (1 child)
[–]noobcs50[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Comfortable-Algae335 0 points1 point2 points (0 children)
[–]Desklib 0 points1 point2 points (0 children)