May-31-2022, 03:26 AM
I seem to have got it working now.
After trying what Larz60+ said, in Python, I right clicked on the code I had opened and selected "Run Code in Python Console". When I did, I noticed that it was telling me that none of the packages I required for the code were installed- although I had them installed for this code file on Pycharm. So the code was falling over and hence not working outside Pycharm.
I went and installed all the required packages for my code in the directory of the file I was trying to use and ran it again in "Run Code in Python Console" inside Pycharm to check for any other errors. Nothing came up so the code worked there.
Now when I double click the .py file in windows explorer, it fires up Python and runs it successfully without needing to open Pycharm.
Thanks again Larz60+. I have spend hours outside Pycharm fiddling without success to get this to work and only after you directed me back inside Pycharm, I tried other things and got lucky.
After trying what Larz60+ said, in Python, I right clicked on the code I had opened and selected "Run Code in Python Console". When I did, I noticed that it was telling me that none of the packages I required for the code were installed- although I had them installed for this code file on Pycharm. So the code was falling over and hence not working outside Pycharm.
I went and installed all the required packages for my code in the directory of the file I was trying to use and ran it again in "Run Code in Python Console" inside Pycharm to check for any other errors. Nothing came up so the code worked there.
Now when I double click the .py file in windows explorer, it fires up Python and runs it successfully without needing to open Pycharm.
Thanks again Larz60+. I have spend hours outside Pycharm fiddling without success to get this to work and only after you directed me back inside Pycharm, I tried other things and got lucky.