This is the code I am primarily trying to get to work. It runs fine when I run it in Spyder (Python 3.8). However when running the .bat file I get the following error message.
urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.
I also tried running a less complex piece of code that also doesn't work, its error message is as follows. (This now works, see below)
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.
My code for the .bat files are as follows (I think my .bat file code is fine, as one of them now runs perfectly, so it's not a path issue):
C:\Users\Thomas\Desktop\Coding\Python\Chess_Files>"C:\Users\Thomas\Anaconda3\python.exe" "C:\Users\Thomas\Desktop\Coding\Python\Python_Code\lichessAPI.py"
C:\Users\Thomas\Desktop\Coding\Python\Chess_Files>"C:\Users\Thomas\Anaconda3\python.exe" "C:\Users\Thomas\Desktop\Coding\Python\Python_Code\planetorbits.py"
UPDATE: I was able to get the second .bat file of code to work, by uninstalling and reinstalling both numpy and matplotlib using pip. However, the first .bat file is still running into the same error.
It has been suggested that I install openSSL, I'm not sure what that even is and why I can't just use urllib3 seeing as that works when I run the code myself in anaconda.
FINAL UPDATE: I have found a solution and posted it below. Hope this helps.