Issue
Rather than installing a version from python.org, I would like to have the CMD use Spyder 5's python installation.
I have done some digging and as I understand it I need to add python to the "Path" variable of my windows system. After adding the python.exe path C:\Program Files\Spyder\Python\python.exe
and also trying C:\Program Files\Spyder\Python
to "Path" in Environment Variables it made no difference and I receive the basic error:
> Python was not found; run without arguments to install from the
> Microsoft Store, or disable this shortcut from Settings > Manage App
> Execution Aliases.
As an additional detail I can open python scripts outside of Spyder after having selected "open with" and then selecting the python.exe file which is located in: C:\Program Files\Spyder\Python\python.exe
. This is great but I definitely want to be able to run scripts from the CMD. I have also looked at C:\Users\Tech\AppData\Local\Spyder
after looking at some my python installations my other machines but no python executables are saved there.
Solution
I have gone ahead and become well versed in how to setup virtual environments. I now set up virtual environments with the necessary libraries I need and simply have spyder use those. This works best for me as I can use easily install libraries that I need and switch environments if necessary. As plus for I can run the scripts in the command prompt easily which was the first issue that I ran into.
Spyder needs additional libraries installed to run with a custom virtual environment. On the first running it will crash and provide the pip command to install the necessary libraries.
I'm still improving my working knowledge of how to manage paths and environments. For now this works well for me and seems to be a step in the right direction.
Answered By - Chazzo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.